本文整理汇总了PHP中TranslationPeer类的典型用法代码示例。如果您正苦于以下问题:PHP TranslationPeer类的具体用法?PHP TranslationPeer怎么用?PHP TranslationPeer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TranslationPeer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getConsolidatedKeywords
public function getConsolidatedKeywords($sLanguageId = null, $bReturnArray = false)
{
if ($sLanguageId == null) {
$sLanguageId = Session::language();
}
$aKeywords = array();
$aKeywords[] = TranslationPeer::getString('meta.keywords', null, '');
$aTags = TagPeer::tagInstancesForObject($this);
foreach ($aTags as $iKey => $oTag) {
$aTags[$iKey] = $oTag->getTag()->getName();
}
$aKeywords[] = $aTags;
$aKeywords[] = Settings::getSetting('frontend', 'keywords', '');
$aKeywords[] = $this->getActivePageString()->getMetaKeywords();
$aResult = array();
foreach ($aKeywords as $iKey => $mKeywords) {
if (!is_array($mKeywords)) {
$mKeywords = explode(',', $mKeywords);
}
foreach ($mKeywords as $sKeyword) {
$sKeyword = trim($sKeyword);
if (!isset($aResult[$sKeyword]) && $sKeyword !== '') {
$aResult[$sKeyword] = true;
}
}
}
if ($bReturnArray) {
return array_keys($aResult);
}
return implode(', ', array_keys($aResult));
}
开发者ID:rapila,项目名称:cms-base,代码行数:31,代码来源:Page.php
示例2: allDocumentsByCategories
public function allDocumentsByCategories()
{
$aResult = array();
// find files in media dirs - large files that cannot be uploaded with http
$aCustomFiles = array();
$aMediaDirs = ResourceFinder::create()->addExpression('web', '/^(media|flash)$/')->addRecursion()->noCache()->returnObjects()->find();
foreach ($aMediaDirs as $oFileResource) {
if ($oFileResource->isFile()) {
$aCustomFiles[$oFileResource->getRelativePath()] = $oFileResource->getInstancePrefix() . $oFileResource->getRelativePath();
}
}
if (count($aCustomFiles) > 0) {
$sCustomFiles = TranslationPeer::getString('wns.documents.custom_files');
$aResult[$sCustomFiles] = array_flip($aCustomFiles);
}
// find files in database ordered by category
foreach (DocumentCategoryQuery::create()->filterByIsExternallyManaged(false)->orderByName()->find() as $oCategory) {
$aDocuments = DocumentQuery::create()->useDocumentCategoryQuery()->filterByIsExternallyManaged(false)->endUse()->orderByDocumentCategoryId()->orderByName()->select(array('Id', 'Name'))->find();
foreach ($aDocuments as $aDocument) {
$aResult[$oCategory->getName()][$aDocument['Id']] = $aDocument['Name'];
}
}
$sWithoutCategory = TranslationPeer::getString('wns.documents.select_without_title');
foreach (self::getDocumentsWithoutCategoryId() as $iId => $sName) {
$aResult[$sWithoutCategory][$iId] = $sName;
}
return $aResult;
}
开发者ID:rapila,项目名称:cms-base,代码行数:28,代码来源:DocumentInputWidgetModule.php
示例3: getMetadataForColumn
public function getMetadataForColumn($sColumnIdentifier)
{
$aResult = array('is_sortable' => true);
switch ($sColumnIdentifier) {
case 'id':
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_DATA;
break;
case 'name':
$aResult['heading'] = TranslationPeer::getString('wns.subscriber_group.name');
break;
case 'display_name':
$aResult['heading'] = TranslationPeer::getString('wns.subscriber_group.display_name');
break;
case 'is_temporary':
$aResult['heading'] = TranslationPeer::getString('wns.subscriber_group.is_temporary');
$aResult['is_sortable'] = false;
break;
case 'link_to_subscriber_data':
$aResult['heading'] = TranslationPeer::getString('wns.subscribers');
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_URL;
break;
case 'delete':
$aResult['heading'] = ' ';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_ICON;
$aResult['field_name'] = 'trash';
$aResult['is_sortable'] = false;
break;
}
return $aResult;
}
开发者ID:rapila,项目名称:plugin-newsletter,代码行数:30,代码来源:SubscriberGroupListWidgetModule.php
示例4: getCustomListElements
public static function getCustomListElements()
{
if (TagInstancePeer::doCount(TagInstancePeer::getTaggedModelsCriteria())) {
return array(array('tag_model_name' => CriteriaListWidgetDelegate::SELECT_ALL, 'title' => TranslationPeer::getString('wns.documents.select_all_title'), 'magic_column' => 'all'));
}
return array();
}
开发者ID:rapila,项目名称:cms-base,代码行数:7,代码来源:TagsAdminModule.php
示例5: getCustomListElements
public function getCustomListElements()
{
if ($this->oTagList->getIncludeAllAndWithout() && TagQuery::create()->filterByTagged($this->oTagList->getTaggedModelName())->count() > 0) {
return array(array('name' => CriteriaListWidgetDelegate::SELECT_ALL, 'display_name' => TranslationPeer::getString('wns.tags.select_all_title'), 'magic_column' => 'all'), array('name' => CriteriaListWidgetDelegate::SELECT_WITHOUT, 'display_name' => TranslationPeer::getString('wns.tags.select_without_title'), 'magic_column' => 'without'));
}
return array();
}
开发者ID:rapila,项目名称:cms-base,代码行数:7,代码来源:TagListWidgetDelegate.php
示例6: getUserOptions
/**
* @deprecated use query methods
*/
public static function getUserOptions()
{
$aUserOptions = array();
foreach (self::$USER_OPTIONS as $iKey => $iValue) {
switch ($iKey) {
case '2':
$sCheckMethod = 'hasBackendAdministrators';
break;
case '3':
$sCheckMethod = 'hasBackendUsersWithRights';
break;
case '4':
$sCheckMethod = 'hasBackendUsersOther';
break;
case '5':
$sCheckMethod = 'hasFrontendUsers';
break;
default:
$sCheckMethod = 'hasBackendUsers';
}
if (self::$sCheckMethod()) {
$aUserOptions[$iKey] = TranslationPeer::getString('user.' . $iValue);
}
}
return $aUserOptions;
}
开发者ID:rapila,项目名称:cms-base,代码行数:29,代码来源:UserPeer.php
示例7: getMetadataForColumn
public function getMetadataForColumn($sColumnIdentifier)
{
$aResult = array('is_sortable' => false);
switch ($sColumnIdentifier) {
case 'id':
$aResult['heading'] = false;
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_DATA;
break;
case 'name':
$aResult['heading'] = TranslationPeer::getString('wns.tag.name');
$aResult['is_sortable'] = true;
break;
case 'tag_instance_count':
$aResult['heading'] = TranslationPeer::getString('wns.tag.instance_count');
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_NUMERIC;
break;
case 'language_ids_of_strings':
$aResult['heading'] = TranslationPeer::getString('wns.tag.available_strings');
break;
case 'delete':
$aResult['heading'] = ' ';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_ICON;
$aResult['field_name'] = 'trash';
break;
}
return $aResult;
}
开发者ID:rapila,项目名称:cms-base,代码行数:27,代码来源:TagListWidgetModule.php
示例8: getMetadataForColumn
public function getMetadataForColumn($sColumnIdentifier)
{
$aResult = array();
switch ($sColumnIdentifier) {
case 'name':
$aResult['heading'] = TranslationPeer::getString('wns.name');
$aResult['is_sortable'] = true;
break;
case 'settings':
$aResult['heading'] = TranslationPeer::getString('wns.document_category.settings');
break;
case 'link_to_document_data':
$aResult['heading'] = TranslationPeer::getString('wns.documents_count');
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_URL;
break;
case 'is_externally_managed':
$aResult['heading'] = TranslationPeer::getString('wns.internally_managed_only');
$aResult['heading_filter'] = array('externally_managed_input', $this->oExternallyManagedInputFilter->getSessionKey());
$aResult['is_sortable'] = false;
break;
case 'delete':
$aResult['heading'] = ' ';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_ICON;
$aResult['field_name'] = 'trash';
break;
}
return $aResult;
}
开发者ID:rapila,项目名称:cms-base,代码行数:28,代码来源:DocumentCategoryListWidgetModule.php
示例9: getCustomListElements
public function getCustomListElements()
{
if (GroupPeer::doCount(new Criteria()) > 0) {
return array(array('group_id' => CriteriaListWidgetDelegate::SELECT_ALL, 'name' => TranslationPeer::getString('wns.roles.select_all_title'), 'magic_column' => 'all'), array('group_id' => CriteriaListWidgetDelegate::SELECT_WITHOUT, 'name' => TranslationPeer::getString('wns.roles.select_without_group_title'), 'magic_column' => 'without'));
}
return array();
}
开发者ID:rapila,项目名称:cms-base,代码行数:7,代码来源:RolesAdminModule.php
示例10: getCustomListElements
public function getCustomListElements()
{
if ($this->getCriteria()->count() > 0) {
return array(array('document_category_id' => CriteriaListWidgetDelegate::SELECT_ALL, 'name_with_externally_managed_state' => TranslationPeer::getString('wns.documents.select_all_title'), 'magic_column' => 'all'), array('document_category_id' => CriteriaListWidgetDelegate::SELECT_WITHOUT, 'name_with_externally_managed_state' => TranslationPeer::getString('wns.documents.select_without_title'), 'magic_column' => 'without'));
}
return array();
}
开发者ID:rapila,项目名称:cms-base,代码行数:7,代码来源:DocumentsAdminModule.php
示例11: getCustomListElements
public function getCustomListElements()
{
if (DocumentationQuery::create()->count() > 0) {
return array(array('documentation_id' => CriteriaListWidgetDelegate::SELECT_ALL, 'full_name' => TranslationPeer::getString('wns.sidebar.select_all'), 'magic_column' => 'all'));
}
return array();
}
开发者ID:rapila,项目名称:plugin-documentation,代码行数:7,代码来源:DocumentationPartsAdminModule.php
示例12: getMetadataForColumn
public function getMetadataForColumn($sColumnIdentifier)
{
$aResult = array('is_sortable' => true);
switch ($sColumnIdentifier) {
case 'extension':
$aResult['heading'] = TranslationPeer::getString('wns.extension');
break;
case 'document_kind':
$aResult['heading'] = TranslationPeer::getString('wns.document_kind');
break;
case 'mimetype':
$aResult['heading'] = TranslationPeer::getString('wns.mimetype');
break;
case 'document_count':
$aResult['heading'] = TranslationPeer::getString('wns.documents_count');
$aResult['is_sortable'] = false;
break;
case 'delete':
$aResult['heading'] = ' ';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_ICON;
$aResult['field_name'] = 'trash';
$aResult['is_sortable'] = false;
break;
}
return $aResult;
}
开发者ID:rapila,项目名称:cms-base,代码行数:26,代码来源:DocumentTypeListWidgetModule.php
示例13: renderFile
public function renderFile()
{
$bCleanup = Manager::usePath() === self::DO_CLEANUP;
$aReferences = ReferenceQuery::create()->find();
self::checkReferences($aReferences, $bCleanup);
if (count(self::$REFERENCES_WITHOUT_FROM) === 0 && count(self::$REFERENCES_WITHOUT_TO) === 0) {
if (!$bCleanup) {
print TranslationPeer::getString('test_references.references_are_ok', null, null, array('count' => count($aReferences)));
} else {
print TranslationPeer::getString('test_references.wrong_references_removed');
print TagWriter::quickTag('p', array(), TagWriter::quickTag('a', array('href' => LinkUtil::link(array('test_references'), 'FileManager')), TranslationPeer::getString('test_references.test_again')));
}
} else {
if (count(self::$REFERENCES_WITHOUT_FROM) > 0) {
print TagWriter::quickTag('p', array(), count(self::$REFERENCES_WITHOUT_FROM) . TranslationPeer::getString('test_references.loose_from_references_found'));
foreach (self::$REFERENCES_WITHOUT_FROM as $oReference) {
print TagWriter::quickTag('p', array(), $oReference->getFromModelName() . '/' . $oReference->getFromId());
}
}
if (count(self::$REFERENCES_WITHOUT_TO) > 0) {
print TagWriter::quickTag('p', array(), count(self::$REFERENCES_WITHOUT_TO) . TranslationPeer::getString('test_references.loose_to_references_found'));
foreach (self::$REFERENCES_WITHOUT_TO as $oReference) {
print TagWriter::quickTag('p', array(), $oReference->getToModelName() . '/' . $oReference->getToId());
}
}
print TagWriter::quickTag('p', array(), TagWriter::quickTag('a', array('href' => LinkUtil::link(array('test_references', self::DO_CLEANUP), 'FileManager')), TranslationPeer::getString('test_references.remove_loose_ends')));
}
}
开发者ID:rapila,项目名称:cms-base,代码行数:28,代码来源:TestReferencesFileModule.php
示例14: getStringAsHTML
public function getStringAsHTML($sKey, $aParams = array(), $sLanguageId = null, $sDefaultValue = null)
{
$mResult = TranslationPeer::getString($sKey, $sLanguageId, $sDefaultValue, $aParams, true);
$oTemplate = new Template(TemplateIdentifier::constructIdentifier('result'), null, true);
$oTemplate->replaceIdentifier('result', $mResult);
return $oTemplate->render();
}
开发者ID:rapila,项目名称:cms-base,代码行数:7,代码来源:StringWidgetModule.php
示例15: getReferences
public static function getReferences($aReferences)
{
if (count($aReferences) === null) {
return null;
}
$aResult = array();
foreach ($aReferences as $oReference) {
if ($oReference->getFromModelName() === 'LanguageObject') {
$oReferencedFromObject = $oReference->getFrom();
if ($oReferencedFromObject) {
$oContentObject = $oReferencedFromObject->getContentObject();
$aResult[$oReferencedFromObject->getId()]['title'] = TranslationPeer::getString('reference.used_in_page');
$aResult[$oReferencedFromObject->getId()]['page_name'] = $oContentObject->getPage()->getName();
$aResult[$oReferencedFromObject->getId()]['container_name'] = $oContentObject->getContainerName();
$aResult[$oReferencedFromObject->getId()]['edit_link'] = TagWriter::quickTag('a', array('href' => LinkUtil::link(array('content', $oContentObject->getPageId(), 'edit', $oContentObject->getId()), 'AdminManager')), 'edit')->render();
} else {
// delete reference if getFrom() === null
$oReference->delete();
}
} else {
$aResult[$oReference->getFromId()]['title'] = TranslationPeer::getString('reference.used_in_object');
$aResult[$oReference->getFromId()]['object_class'] = $oReference->getFromModelName();
$aResult[$oReference->getFromId()]['object_id'] = $oReference->getFromId();
}
}
return $aResult;
}
开发者ID:rapila,项目名称:cms-base,代码行数:27,代码来源:AdminModule.php
示例16: getCustomListElements
public function getCustomListElements()
{
if (SubscriberGroupQuery::create()->count() > 0) {
return array(array('id' => CriteriaListWidgetDelegate::SELECT_ALL, 'readable_name' => TranslationPeer::getString('wns.subscriber_group.select_all_title'), 'magic_column' => 'all'), array('id' => CriteriaListWidgetDelegate::SELECT_WITHOUT, 'readable_name' => TranslationPeer::getString('wns.subscriber_group.select_without_title'), 'magic_column' => 'without'));
}
return array();
}
开发者ID:rapila,项目名称:plugin-newsletter,代码行数:7,代码来源:NewslettersAdminModule.php
示例17: getCustomListElements
public static function getCustomListElements()
{
if (count(self::getDocumentKinds()) > 0) {
return array(array('document_kind' => CriteriaListWidgetDelegate::SELECT_ALL, 'title' => TranslationPeer::getString('wns.documents.select_all_title'), 'magic_column' => 'all'));
}
return array();
}
开发者ID:rapila,项目名称:cms-base,代码行数:7,代码来源:DocumentTypesAdminModule.php
示例18: getNewslettersWithSentInfo
public static function getNewslettersWithSentInfo($iLimit = 10)
{
$oCriteria = new Criteria();
$oCriteria->addDescendingOrderByColumn(self::CREATED_AT);
$oCriteria->addAscendingOrderByColumn(self::SUBJECT);
$oCriteria->addJoin(self::ID, NewsletterMailingPeer::NEWSLETTER_ID, Criteria::LEFT_JOIN);
$oCriteria->setLimit($iLimit);
$aResult = array();
foreach (self::doSelect($oCriteria) as $oNewsletter) {
$oNewsletterName = '[' . $oNewsletter->getCreatedAt('Y-m-d') . '] ' . $oNewsletter->getSubject();
$aSentFirstletters = array();
if ($oNewsletter->hasNewsletterMailings()) {
foreach ($oNewsletter->getNewsletterMailings() as $oNewsletterMailing) {
if ($oNewsletterMailing->getSubscriberGroup()) {
$aSentFirstletters[] = $oNewsletterMailing->getSubscriberGroup()->getNameFirstLetter();
} elseif ($oNewsletterMailing->getExternalMailGroupId()) {
$aSentFirstletters[] = 'Ext';
}
}
if (count($aSentFirstletters) > 0) {
$oNewsletterName .= ' [' . TranslationPeer::getString('newsletter_mailing.sent_info') . ' ' . implode(', ', $aSentFirstletters) . ']';
}
}
$aResult[$oNewsletter->getId()] = $oNewsletterName;
}
return $aResult;
}
开发者ID:rapila,项目名称:plugin-newsletter,代码行数:27,代码来源:NewsletterPeer.php
示例19: getMetadataForColumn
public function getMetadataForColumn($sColumnIdentifier)
{
$aResult = array('is_sortable' => true);
switch ($sColumnIdentifier) {
case 'name':
$aResult['heading'] = TranslationPeer::getString('wns.journal.name');
break;
case 'enable_comments':
$aResult['heading'] = TranslationPeer::getString('wns.journal.enable_comments');
break;
case 'notify_comments':
$aResult['heading'] = TranslationPeer::getString('wns.journal.notify_comments');
break;
case 'use_captcha':
$aResult['heading'] = TranslationPeer::getString('wns.journal.use_captcha');
break;
case 'count_entries':
$aResult['heading'] = TranslationPeer::getString('wns.journal.count_entries');
$aResult['is_sortable'] = false;
break;
case 'delete':
$aResult['heading'] = ' ';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_ICON;
$aResult['field_name'] = 'trash';
$aResult['is_sortable'] = false;
break;
}
return $aResult;
}
开发者ID:rapila,项目名称:plugin-journal,代码行数:29,代码来源:JournalListWidgetModule.php
示例20: getMetadataForColumn
public function getMetadataForColumn($sColumnIdentifier)
{
$aResult = array();
switch ($sColumnIdentifier) {
case 'id':
$aResult['heading'] = false;
$aResult['field_name'] = 'role_key';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_DATA;
break;
case 'role_key':
$aResult['heading'] = TranslationPeer::getString('wns.role.role_key');
$aResult['is_sortable'] = true;
break;
case 'description':
$aResult['heading'] = TranslationPeer::getString('wns.role.description');
$aResult['is_sortable'] = true;
break;
case 'user_id':
$aResult['heading'] = TranslationPeer::getString('wns.role.user_with_role_count');
$aResult['field_name'] = 'user_with_role_count';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_NUMERIC;
break;
case 'group_id':
$aResult['heading'] = TranslationPeer::getString('wns.role.group_with_role_count');
$aResult['field_name'] = 'group_with_role_count';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_NUMERIC;
break;
case 'delete':
$aResult['heading'] = ' ';
$aResult['display_type'] = ListWidgetModule::DISPLAY_TYPE_ICON;
$aResult['field_name'] = 'trash';
break;
}
return $aResult;
}
开发者ID:rapila,项目名称:cms-base,代码行数:35,代码来源:RoleListWidgetModule.php
注:本文中的TranslationPeer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论