当前位置: 首页>>代码示例>>PHP>>正文


PHP Language::lbl方法代码示例

本文整理汇总了PHP中Backend\Core\Language\Language::lbl方法的典型用法代码示例。如果您正苦于以下问题:PHP Language::lbl方法的具体用法?PHP Language::lbl怎么用?PHP Language::lbl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Backend\Core\Language\Language的用法示例。


在下文中一共展示了Language::lbl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     $this->imageIsAllowed = $this->get('fork.settings')->get($this->URL->getModule(), 'show_image_form', true);
     $this->frm = new BackendForm('add');
     // set hidden values
     $rbtHiddenValues[] = array('label' => BL::lbl('Hidden', $this->URL->getModule()), 'value' => 'Y');
     $rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
     // get categories
     $categories = BackendBlogModel::getCategories();
     $categories['new_category'] = \SpoonFilter::ucfirst(BL::getLabel('AddCategory'));
     // create elements
     $this->frm->addText('title', null, null, 'form-control title', 'form-control danger title');
     $this->frm->addEditor('text');
     $this->frm->addEditor('introduction');
     $this->frm->addRadiobutton('hidden', $rbtHiddenValues, 'N');
     $this->frm->addCheckbox('allow_comments', $this->get('fork.settings')->get($this->getModule(), 'allow_comments', false));
     $this->frm->addDropdown('category_id', $categories, \SpoonFilter::getGetValue('category', null, null, 'int'));
     if (count($categories) != 2) {
         $this->frm->getField('category_id')->setDefaultElement('');
     }
     $this->frm->addDropdown('user_id', BackendUsersModel::getUsers(), BackendAuthentication::getUser()->getUserId());
     $this->frm->addText('tags', null, null, 'form-control js-tags-input', 'form-control danger js-tags-input');
     $this->frm->addDate('publish_on_date');
     $this->frm->addTime('publish_on_time');
     if ($this->imageIsAllowed) {
         $this->frm->addImage('image');
     }
     // meta
     $this->meta = new BackendMeta($this->frm, null, 'title', true);
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:33,代码来源:Add.php

示例2: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     $this->isGod = BackendAuthentication::getUser()->isGod();
     $this->frm = new BackendForm('settingsEmail');
     // email settings
     $mailerFrom = $this->get('fork.settings')->get('Core', 'mailer_from');
     $this->frm->addText('mailer_from_name', isset($mailerFrom['name']) ? $mailerFrom['name'] : '');
     $this->frm->addText('mailer_from_email', isset($mailerFrom['email']) ? $mailerFrom['email'] : '')->setAttribute('type', 'email');
     $mailerTo = $this->get('fork.settings')->get('Core', 'mailer_to');
     $this->frm->addText('mailer_to_name', isset($mailerTo['name']) ? $mailerTo['name'] : '');
     $this->frm->addText('mailer_to_email', isset($mailerTo['email']) ? $mailerTo['email'] : '')->setAttribute('type', 'email');
     $mailerReplyTo = $this->get('fork.settings')->get('Core', 'mailer_reply_to');
     $this->frm->addText('mailer_reply_to_name', isset($mailerReplyTo['name']) ? $mailerReplyTo['name'] : '');
     $this->frm->addText('mailer_reply_to_email', isset($mailerReplyTo['email']) ? $mailerReplyTo['email'] : '')->setAttribute('type', 'email');
     if ($this->isGod) {
         $mailerType = $this->get('fork.settings')->get('Core', 'mailer_type', 'mail');
         $this->frm->addDropdown('mailer_type', array('mail' => 'PHP\'s mail', 'smtp' => 'SMTP'), $mailerType);
         // smtp settings
         $this->frm->addText('smtp_server', $this->get('fork.settings')->get('Core', 'smtp_server', ''));
         $this->frm->addText('smtp_port', $this->get('fork.settings')->get('Core', 'smtp_port', 25));
         $this->frm->addText('smtp_username', $this->get('fork.settings')->get('Core', 'smtp_username', ''));
         $this->frm->addPassword('smtp_password', $this->get('fork.settings')->get('Core', 'smtp_password', ''));
         $this->frm->addDropdown('smtp_secure_layer', array('no' => ucfirst(BL::lbl('None')), 'ssl' => 'SSL', 'tls' => 'TLS'), $this->get('fork.settings')->get('Core', 'smtp_secure_layer', 'no'));
     }
     $this->tpl->assign('isGod', $this->isGod);
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:29,代码来源:Email.php

示例3: load

 /**
  * Load the forms
  */
 private function load()
 {
     $this->frm = new BackendForm(null, null, 'post', true, false);
     $this->frm->addText('backend_email')->setAttribute('placeholder', \SpoonFilter::ucfirst(BL::lbl('Email')))->setAttribute('type', 'email');
     $this->frm->addPassword('backend_password')->setAttribute('placeholder', \SpoonFilter::ucfirst(BL::lbl('Password')));
     $this->frmForgotPassword = new BackendForm('forgotPassword');
     $this->frmForgotPassword->addText('backend_email_forgot');
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:11,代码来源:Index.php

示例4: parse

 /**
  * Parse into template
  */
 private function parse()
 {
     // get the logged in user
     $authenticatedUser = BackendAuthentication::getUser();
     // check if we need to show the password strength and parse the label
     $this->tpl->assign('showPasswordStrength', $authenticatedUser->getSetting('password_strength') !== 'strong');
     $this->tpl->assign('passwordStrengthLabel', BL::lbl($authenticatedUser->getSetting('password_strength')));
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:11,代码来源:Statistics.php

示例5: loadForm

 /**
  * Loads the settings form
  */
 private function loadForm()
 {
     $this->frm = new BackendForm('settings');
     // add map info (widgets)
     $this->frm->addDropdown('zoom_level_widget', array_combine(array_merge(array('auto'), range(3, 18)), array_merge(array(BL::lbl('Auto', $this->getModule())), range(3, 18))), $this->get('fork.settings')->get($this->URL->getModule(), 'zoom_level_widget', 13));
     $this->frm->addText('width_widget', $this->get('fork.settings')->get($this->URL->getModule(), 'width_widget'));
     $this->frm->addText('height_widget', $this->get('fork.settings')->get($this->URL->getModule(), 'height_widget'));
     $this->frm->addDropdown('map_type_widget', array('ROADMAP' => BL::lbl('Roadmap', $this->getModule()), 'SATELLITE' => BL::lbl('Satellite', $this->getModule()), 'HYBRID' => BL::lbl('Hybrid', $this->getModule()), 'TERRAIN' => BL::lbl('Terrain', $this->getModule()), 'STREET_VIEW' => BL::lbl('StreetView', $this->getModule())), $this->get('fork.settings')->get($this->URL->getModule(), 'map_type_widget', 'roadmap'));
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:12,代码来源:Settings.php

示例6: loadDataGrid

 /**
  * Load the datagrid
  */
 public function loadDataGrid()
 {
     $this->dataGrid = new BackendDataGridDB(BackendGroupsModel::QRY_BROWSE);
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('Edit')) {
         $this->dataGrid->setColumnURL('name', BackendModel::createURLForAction('Edit') . '&id=[id]');
         $this->dataGrid->setColumnURL('num_users', BackendModel::createURLForAction('Edit') . '&id=[id]#tabUsers');
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('Edit') . '&id=[id]');
     }
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:13,代码来源:Index.php

示例7: loadDataGrid

 /**
  * Load the datagrids
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new BackendDataGridDB(BackendExtensionsModel::QRY_BROWSE_TEMPLATES, array($this->selectedTheme));
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('EditThemeTemplate')) {
         // set colum URLs
         $this->dataGrid->setColumnURL('title', BackendModel::createURLForAction('EditThemeTemplate') . '&id=[id]');
         // add edit column
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('EditThemeTemplate') . '&id=[id]', BL::lbl('Edit'));
     }
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:15,代码来源:ThemeTemplates.php

示例8: loadDataGrid

 /**
  * Load the datagrid
  */
 private function loadDataGrid()
 {
     $this->dataGrid = new ContentBlockDataGrid(Locale::workingLocale());
     $this->dataGrid->setSortingColumns(['title']);
     // show the hidden status
     $this->dataGrid->addColumn('isHidden', ucfirst(BL::lbl('VisibleOnSite')), '[hidden]');
     $this->dataGrid->setColumnFunction([TemplateModifiers::class, 'showBool'], ['[hidden]', true], 'isHidden');
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('Edit')) {
         $editUrl = BackendModel::createURLForAction('Edit', null, null, ['id' => '[id]'], false);
         $this->dataGrid->setColumnURL('title', $editUrl);
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), $editUrl, BL::lbl('Edit'));
     }
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:17,代码来源:Index.php

示例9: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     // get values for the form
     $rbtHiddenValues[] = array('label' => BL::lbl('Hidden'), 'value' => 'Y');
     $rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
     $categories = BackendFaqModel::getCategories();
     // create form
     $this->frm = new BackendForm('edit');
     $this->frm->addText('title', $this->record['question'], null, 'form-control title', 'form-control danger title');
     $this->frm->addEditor('answer', $this->record['answer']);
     $this->frm->addRadiobutton('hidden', $rbtHiddenValues, $this->record['hidden']);
     $this->frm->addDropdown('category_id', $categories, $this->record['category_id']);
     $this->frm->addText('tags', BackendTagsModel::getTags($this->URL->getModule(), $this->record['id']), null, 'form-control js-tags-input', 'form-control danger js-tags-input');
     $this->meta = new BackendMeta($this->frm, $this->record['meta_id'], 'title', true);
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:18,代码来源:Edit.php

示例10: loadDataGrid

 /**
  * Loads the datagrids
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new BackendDataGridDB(BackendSearchModel::QRY_DATAGRID_BROWSE_SYNONYMS, BL::getWorkingLanguage());
     // sorting columns
     $this->dataGrid->setSortingColumns(array('term'), 'term');
     // column function
     $this->dataGrid->setColumnFunction('str_replace', array(',', ', ', '[synonym]'), 'synonym', true);
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('EditSynonym')) {
         // set column URLs
         $this->dataGrid->setColumnURL('term', BackendModel::createURLForAction('EditSynonym') . '&id=[id]');
         // add column
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('EditSynonym') . '&id=[id]', BL::lbl('Edit'));
     }
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:19,代码来源:Synonyms.php

示例11: loadDataGrid

 /**
  * Load the datagrid.
  */
 private function loadDataGrid()
 {
     // create datagrid with an overview of all active and undeleted users
     $this->dataGrid = new BackendDataGridDB(BackendUsersModel::QRY_BROWSE, array('N'));
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('Edit')) {
         // add column
         $this->dataGrid->addColumn('nickname', \SpoonFilter::ucfirst(BL::lbl('Nickname')), null, BackendModel::createURLForAction('Edit') . '&id=[id]', BL::lbl('Edit'));
         // add edit column
         if (BackendAuthentication::isAllowedAction('Add') || BackendAuthentication::getUser()->isGod()) {
             $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('Edit') . '&id=[id]');
         }
     }
     // show the user's nickname
     $this->dataGrid->setColumnFunction(array('Backend\\Modules\\Users\\Engine\\Model', 'getSetting'), array('[id]', 'nickname'), 'nickname', false);
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:19,代码来源:Index.php

示例12: loadDataGrid

 /**
  * Loads the datagrids
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new BackendDataGridDB(BackendSearchModel::QRY_DATAGRID_BROWSE_STATISTICS, BL::getWorkingLanguage());
     // hide column
     $this->dataGrid->setColumnsHidden('data');
     // create column
     $this->dataGrid->addColumn('referrer', BL::lbl('Referrer'));
     // header labels
     $this->dataGrid->setHeaderLabels(array('time' => \SpoonFilter::ucfirst(BL::lbl('SearchedOn'))));
     // set column function
     $this->dataGrid->setColumnFunction(array(__CLASS__, 'setReferrer'), '[data]', 'referrer');
     $this->dataGrid->setColumnFunction(array(new BackendDataGridFunctions(), 'getLongDate'), array('[time]'), 'time', true);
     // sorting columns
     $this->dataGrid->setSortingColumns(array('time', 'term'), 'time');
     $this->dataGrid->setSortParameter('desc');
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:20,代码来源:Statistics.php

示例13: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     // create form
     $this->frm = new BackendForm('add');
     // set hidden values
     $rbtHiddenValues[] = array('label' => BL::lbl('Hidden', $this->URL->getModule()), 'value' => 'Y');
     $rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
     // get categories
     $categories = BackendFaqModel::getCategories();
     // create elements
     $this->frm->addText('title', null, null, 'form-control title', 'form-control danger title');
     $this->frm->addEditor('answer');
     $this->frm->addRadiobutton('hidden', $rbtHiddenValues, 'N');
     $this->frm->addDropdown('category_id', $categories);
     $this->frm->addText('tags', null, null, 'form-control js-tags-input', 'form-control danger js-tags-input');
     // meta
     $this->meta = new BackendMeta($this->frm, null, 'title', true);
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:21,代码来源:Add.php

示例14: loadDataGrid

 /**
  * Loads the datagrids
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new BackendDataGridDB(BackendBlogModel::QRY_DATAGRID_BROWSE_CATEGORIES, array('active', BL::getWorkingLanguage()));
     // set headers
     $this->dataGrid->setHeaderLabels(array('num_items' => \SpoonFilter::ucfirst(BL::lbl('Amount'))));
     // sorting columns
     $this->dataGrid->setSortingColumns(array('title', 'num_items'), 'title');
     // convert the count into a readable and clickable one
     $this->dataGrid->setColumnFunction(array(__CLASS__, 'setClickableCount'), array('[num_items]', BackendModel::createURLForAction('Index') . '&category=[id]'), 'num_items', true);
     // disable paging
     $this->dataGrid->setPaging(false);
     // add attributes, so the inline editing has all the needed data
     $this->dataGrid->setColumnAttributes('title', array('data-id' => '{id:[id]}'));
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('EditCategory')) {
         // set column URLs
         $this->dataGrid->setColumnURL('title', BackendModel::createURLForAction('EditCategory') . '&id=[id]');
         // add column
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('EditCategory') . '&id=[id]', BL::lbl('Edit'));
     }
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:25,代码来源:Categories.php

示例15: loadDataGrid

 /**
  * Loads the datagrids
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new BackendDataGridDB(BackendTagsModel::QRY_DATAGRID_BROWSE, BL::getWorkingLanguage());
     // header labels
     $this->dataGrid->setHeaderLabels(array('tag' => \SpoonFilter::ucfirst(BL::lbl('Name')), 'num_tags' => \SpoonFilter::ucfirst(BL::lbl('Amount'))));
     // sorting columns
     $this->dataGrid->setSortingColumns(array('tag', 'num_tags'), 'num_tags');
     $this->dataGrid->setSortParameter('desc');
     // add the multicheckbox column
     $this->dataGrid->setMassActionCheckboxes('check', '[id]');
     // add mass action dropdown
     $ddmMassAction = new \SpoonFormDropdown('action', array('delete' => BL::lbl('Delete')), 'delete', false, 'form-control', 'form-control danger');
     $ddmMassAction->setOptionAttributes('delete', array('data-target' => '#confirmDelete'));
     $this->dataGrid->setMassAction($ddmMassAction);
     // add attributes, so the inline editing has all the needed data
     $this->dataGrid->setColumnAttributes('tag', array('data-id' => '{id:[id]}'));
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('Edit')) {
         // add column
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('Edit') . '&id=[id]', BL::lbl('Edit'));
     }
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:26,代码来源:Index.php


注:本文中的Backend\Core\Language\Language::lbl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。