本文整理汇总了PHP中__T函数的典型用法代码示例。如果您正苦于以下问题:PHP __T函数的具体用法?PHP __T怎么用?PHP __T使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了__T函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Init
*
* @return void
* @access public
*/
function init()
{
// define the custom attributes
$this->defineAttribute('label', false, __T('GLZ_PRINT_PDF'), COMPONENT_TYPE_STRING);
// call the superclass for validate the attributes
parent::init();
}
示例2: getAvailableTemplates
public function getAvailableTemplates()
{
$templatePath = __Paths::get('APPLICATION_TO_ADMIN_TEMPLATE');
$templates = array();
if ($dh = @opendir($templatePath)) {
// scan the template repository
while ($dirName = readdir($dh)) {
// check if the item is a folder
if ($dirName != "." && $dirName != ".." && is_dir($templatePath . '/' . $dirName)) {
// is a folder
// check if ther eis the rpeview image
// withou the preview the template isn't added
if (file_exists($templatePath . '/' . $dirName . '/preview.jpg') && !file_exists($templatePath . '/' . $dirName . '/disabled')) {
// check and include the locale file
if (file_exists($templatePath . '/' . $dirName . '/locale/' . $this->application->getLanguage() . '.php')) {
include $templatePath . '/' . $dirName . '/locale/' . $this->application->getLanguage() . '.php';
$templateName = __T($dirName);
} else {
$templateName = $dirName;
}
$templates[] = org_glizy_ObjectFactory::createObject('org.glizycms.template.models.TemplateVO', $templateName, $dirName, $templatePath . '/' . $dirName . '/preview.jpg');
}
}
}
closedir($dh);
} else {
// TODO
// show error
}
return $templates;
}
示例3: searchDocumentsByTerm
public function searchDocumentsByTerm($term, $id, $protocol = '', $filterType = '')
{
$result = array();
if ($protocol && $protocol != $this->protocol) {
return $result;
}
$application = __ObjectValues::get('org.glizy', 'application');
$entityTypeService = $application->retrieveProxy('movio.modules.ontologybuilder.service.EntityTypeService');
if ($term) {
$it = org_glizy_objectFactory::createModelIterator('movio.modules.ontologybuilder.models.EntityDocument', 'All');
if ($term != '') {
$it->where('title', '%' . $term . '%', 'ILIKE');
}
$it->orderBy('title');
foreach ($it as $ar) {
$entityTypeId = $entityTypeService->getEntityTypeId($ar->document_type);
$result[] = array('id' => $this->protocol . $ar->document_id, 'text' => $ar->title, 'path' => __T('Content') . '/' . $entityTypeService->getEntityTypeName($entityTypeId));
}
} elseif ($id) {
if (strpos($id, $this->protocol) !== 0) {
return $result;
}
$ar = org_glizy_objectFactory::createModel('movio.modules.ontologybuilder.models.EntityDocument');
$ar->load($this->getIdFromLink($id));
$entityTypeId = $entityTypeService->getEntityTypeId($ar->document_type);
$result[] = array('id' => $this->protocol . $ar->document_id, 'text' => $ar->title, 'path' => __T('Content') . '/' . $entityTypeService->getEntityTypeName($entityTypeId));
}
return $result;
}
示例4: renderDeleteButton
protected function renderDeleteButton($key, $row)
{
$output = '';
if ($this->canView && $this->canDelete) {
$output .= __Link::makeLinkWithIcon('actionsMVC', 'icon-trash btn-icon', array('title' => __T('GLZ_RECORD_DELETE'), 'action' => 'deleteDictionary'), __T('GLZ_RECORD_MSG_DELETE'), array('dictionaryId' => $key));
}
return $output;
}
示例5: renderVisibilityButton
protected function renderVisibilityButton($key, $row)
{
$output = '';
if ($this->canView && $this->canEdit) {
$output .= __Link::makeLinkWithIcon('actionsMVCToggleVisibility', __Config::get($row->isVisible() ? 'glizy.datagrid.action.showCssClass' : 'glizy.datagrid.action.hideCssClass'), array('title' => $row->isVisible() ? __T('Hide') : __T('Show'), 'id' => $key, 'model' => $row->getClassName(false), 'action' => 'togglevisibility'));
}
return $output;
}
示例6: render
function render()
{
$minHeight = count($this->buttonListBase) * 29 + 2;
$output .= '
<div class="control-group">
<label class="control-label " for="sharingButton">' . __T('Enable sharing buttons') . '</label>
<div class="controls">
<input type="checkbox" data-type="checkbox" value ="1"' . $this->enableCheck . 'name="sharingButtonCheck" id="sharingButtonCheck">
</div>
</div>
<div id"shareButtonDrag" class="control-group" style="margin-left:20px;">
<div class ="span2">
<div style="font-weight:bold; margin-bottom:5px;">
<hX>' . __T('Available buttons') . '</hX>
</div>
<ul id="shareButtonListOff" class="sortable js-sharingDisabled" style="min-height:' . $minHeight . 'px;">';
foreach ($this->buttonListBase as $button) {
if (!in_array($button, $this->enabledButtons)) {
$output .= '
<li id="shareButton_' . $button . '" class="ui-state-default">' . $button . '</li>';
}
}
$output .= '
</ul>
</div>
<div class ="span2">
<div style="font-weight:bold; margin-bottom:5px;">
<hX>' . __T('Enabled buttons') . '</hX>
</div>
<ul id="shareButtonListOn" class="sortable js-sharingEnabled " style="min-height:' . $minHeight . 'px;">';
foreach ($this->buttonListBase as $button) {
if (in_array($button, $this->enabledButtons)) {
$output .= '
<li id="shareButton_' . $button . '" class="ui-state-default">' . $button . '</li>';
}
}
$output .= '
</ul>
</div>
<div class ="sortableNote">' . __T('Move and sort the buttons') . '</div>
</div>
<div class="control-group" >
<label class="control-label " for="shareButtonDim">' . __T('Select dimension') . '</label>
<div class="controls">
<select name="shareButtonDim" id="shareButtonDim" class="span3">';
foreach ($this->dimList as $key => $dim) {
if ($key == trim($this->selectedDim)) {
$output .= '<option selected="selected" value="' . $key . '">' . $dim . '</option>';
} else {
$output .= '<option value="' . $key . '">' . $dim . '</option>';
}
}
$output .= '
</select>
</div>
</div>';
$this->addOutputCode($output);
}
示例7: renderCell
function renderCell($key, $value, $row)
{
$entityId = $key;
$entityTypeId = str_replace('entity', '', $row->getType());
$output = __Link::makeLinkWithIcon('actionEntities', 'btn-icon icon-pencil', array('title' => __T('GLZ_RECORD_EDIT'), 'entityTypeId' => $entityTypeId, 'entityId' => $entityId, 'action' => 'edit'));
$output .= __Link::makeLinkWithIcon('actionEntities', 'icon-trash btn-icon', array('title' => __T('GLZ_RECORD_DELETE'), 'entityTypeId' => $entityTypeId, 'entityId' => $entityId, 'action' => 'delete'), __T('GLZ_RECORD_MSG_DELETE'));
$output .= __Link::makeLinkWithIcon('actionEntities', $row->isVisible() ? 'icon-eye-open btn-icon' : 'icon-eye-close btn-icon', array('title' => $row->isVisible() ? __T('Hide') : __T('Show'), 'entityTypeId' => $entityTypeId, 'entityId' => $entityId, 'action' => 'togglevisibility'));
return $output;
}
示例8: init
/**
* Init
*
* @return void
* @access public
*/
function init()
{
$this->defineAttribute('label', false, __T('GLZ_SEARCH_LABEL'), COMPONENT_TYPE_STRING);
$this->defineAttribute('buttonLabel', false, __T('GLZ_SEARCH_BUTTON'), COMPONENT_TYPE_STRING);
$this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);
$this->defineAttribute('searchPageId', false, '', COMPONENT_TYPE_STRING);
$this->defineAttribute('title', false, __T('GLZ_SEARCH_BUTTON'), COMPONENT_TYPE_STRING);
parent::init();
}
示例9: execute
function execute()
{
if ($this->id > 0) {
$this->logAndMessage(__T('Record cancellato'));
$ar = org_glizy_ObjectFactory::createModel($this->modelName);
$ar->delete($this->id);
$this->changePage('link', array('pageId' => $this->pageId));
}
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->type = 'movio.modules.touristoperators';
$this->protocol = 'movioTouristOperators:';
$this->model = 'movio.modules.touristoperators.models.Model';
$this->pageType = 'movio.modules.touristoperators.views.FrontEnd';
$this->modelName = __T('movio.modules.touristoperators.views.FrontEnd');
}
示例11: renderCell
function renderCell($ar)
{
$localeService = $this->application->retrieveProxy('movio.modules.ontologybuilder.service.LocaleService');
$language = $this->application->getEditingLanguage();
$ar->entity_name = $localeService->getTranslation($language, $ar->entity_name);
// TODO controllo acl
$ar->__url__ = __Link::makeLinkWithIcon('actionsMVC', 'icon-pencil icon-white', array('action' => 'edit', 'id' => $ar->getId(), 'title' => __T('GLZ_RECORD_EDIT')));
$ar->__urlDelete__ = __Link::makeLinkWithIcon('actionsMVC', 'icon-remove icon-white', array('action' => 'delete', 'id' => $ar->getId(), 'title' => __T('GLZ_RECORD_EDIT')), __T('GLZ_RECORD_MSG_DELETE'));
}
示例12: renderCell
function renderCell($key, $value, $row)
{
$output = '';
$output .= '<p>' . __T('GLZ_MEDIA_TITLE') . ': <strong>' . (!empty($row['media_title']) ? $row['media_title'] : '-') . '</strong><br />';
$output .= __T('GLZ_MEDIA_CATEGORY') . ': <strong>' . (!empty($row['media_category']) ? $row['media_category'] : '-') . '</strong><br />';
$output .= __T('GLZ_MEDIA_FILENAME') . ': <strong>' . $row['media_originalFileName'] . '</strong> <small>(' . $row['media_fileName'] . ')</small><br />';
$output .= __T('GLZ_MEDIA_SIZE') . ': <strong>' . number_format($row['media_size'] / 1024) . ' Kb</strong></p>';
return $output;
}
示例13: getGraph
public function getGraph($entityTypeId, &$visited, &$edges, $firstNode = false)
{
if ($visited[$entityTypeId]) {
return '';
} else {
$entityTypeService = $this->_application->retrieveProxy('movio.modules.ontologybuilder.service.EntityTypeService');
$entityProperties = $entityTypeService->getEntityTypeProperties($entityTypeId);
$graph = '';
$color = __Config::get('movio.graph.shapeColor');
$entityTypeName = $entityTypeService->getEntityTypeName($entityTypeId);
if ($this->getAttribute('generateLinks')) {
$entityResolver = org_glizy_objectFactory::createObject('movio.modules.ontologybuilder.EntityResolver');
$ar = $entityResolver->getMenuVisibleEntity($entityTypeId);
if ($ar) {
$url = 'URL="' . $this->makeUrl($ar->id, $ar->title) . '"';
}
}
// se è il nodo da cui inizia la ricerca ricorsiva
if ($firstNode or empty($url)) {
$s = $url ? $url . ', ' : '';
$graph .= '"' . $this->escape($entityTypeName) . '" [' . $s . 'label="<span>' . $this->escape($entityTypeName . ' ' . __Link::makeLinkWithIcon('actionsMVC', 'icon-pencil icon-white', array('action' => 'edit', 'id' => $entityTypeId, 'title' => __T('GLZ_RECORD_EDIT'))) . '<a href="' . __Link::makeURL('actionsMVC', array('action' => 'delete', 'id' => $entityTypeId)) . '" onclick="if (!confirm('' . __T('GLZ_RECORD_MSG_DELETE') . '')){return false}"><i class="icon-remove icon-white"></i></a>') . ' </span>"];' . PHP_EOL;
} else {
if ($url) {
$graph .= '"' . $this->escape($entityTypeName) . '" [' . $url . '];' . PHP_EOL;
}
}
$visited[$entityTypeId] = true;
foreach ((array) $entityProperties as $entityProperty) {
if ($entityProperty['entity_properties_target_FK_entity_id']) {
$toEntityTypeId = $entityProperty['entity_properties_target_FK_entity_id'];
$toEntityTypeName = $entityTypeService->getEntityTypeName($toEntityTypeId);
$label = __Tp('rel:' . $entityProperty['entity_properties_type']);
if (!$edges[$entityTypeName][$toEntityTypeName]) {
$edges[$entityTypeName][$toEntityTypeName] = true;
$graph .= '"' . $this->escape($entityTypeName) . '" -> "' . $this->escape($toEntityTypeName) . '" [label="' . $this->escape($label) . '"];' . PHP_EOL;
}
$graph .= $this->getGraph($toEntityTypeId, $visited, $edges);
}
}
$referenceRelations = $entityTypeService->getEntityTypeReferenceRelations($entityTypeId);
foreach ((array) $referenceRelations as $referenceRelation) {
if ($referenceRelation['entity_properties_target_FK_entity_id']) {
$toEntityTypeId = $referenceRelation['entity_properties_FK_entity_id'];
$toEntityTypeName = $entityTypeService->getEntityTypeName($toEntityTypeId);
$label = __Tp('rel:' . $referenceRelation['entity_properties_type']);
if (!$edges[$toEntityTypeName][$entityTypeName]) {
$edges[$toEntityTypeName][$entityTypeName] = true;
$graph .= '"' . $this->escape($toEntityTypeName) . '" -> "' . $this->escape($entityTypeName) . '" [label="' . $this->escape($label) . '"];' . PHP_EOL;
}
$graph .= $this->getGraph($toEntityTypeId, $visited, $edges);
}
}
$visited[$entityTypeId] = true;
return $graph;
}
}
示例14: loadXml
private function loadXml()
{
$xml = org_glizy_ObjectFactory::createObject('org.glizy.parser.XML');
$xml->loadAndParseNS($this->source);
$pageTypes = $xml->getElementsByTagName('pageType');
$this->pageTypesMap = array();
foreach ($pageTypes as $pageType) {
$name = $pageType->getAttribute('name');
$this->pageTypesMap[$name] = array('name' => $name, 'label' => $pageType->hasAttribute('label') ? __T($pageType->getAttribute('label')) : $pageType->getAttribute('name'), 'class' => $pageType->getAttribute('class'), 'unique' => $pageType->hasAttribute('unique') ? $pageType->getAttribute('unique') == 'true' : false, 'acceptParent' => $pageType->hasAttribute('acceptParent') ? $pageType->getAttribute('acceptParent') : '');
}
}
示例15: renderCell
function renderCell($key, $value, $item, $columnName)
{
$pageId = $this->application->getPageId();
if ($this->user->acl($pageId, 'all') or $this->user->acl($pageId, 'edit')) {
$output = org_glizy_Assets::makeLinkWithIcon('actionsMVC', 'icon-pencil btn-icon', array('title' => __T('GLZ_RECORD_EDIT'), 'id' => $key, 'action' => 'edit'));
}
if (!$item->language_isDefault) {
$output .= org_glizy_Assets::makeLinkWithIcon('actionsMVC', 'icon-trash btn-icon', array('title' => __T('GLZ_RECORD_DELETE'), 'id' => $key, 'action' => 'delete'), __T('conferma cancellazione record'));
}
return $output;
}