本文整理汇总了PHP中Backend\Core\Engine\Language::lbl方法的典型用法代码示例。如果您正苦于以下问题:PHP Language::lbl方法的具体用法?PHP Language::lbl怎么用?PHP Language::lbl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Backend\Core\Engine\Language
的用法示例。
在下文中一共展示了Language::lbl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadForm
/**
* Loads the settings form
*/
private function loadForm()
{
// init settings form
$this->frm = new BackendForm('settings');
$settings = BackendModel::get('fork.settings')->getForModule('Agenda');
$this->frm->addText('width1', $settings['width1']);
$this->frm->addText('height1', $settings['height1']);
$this->frm->addCheckbox('allow_enlargment1', $settings['allow_enlargment1']);
$this->frm->addCheckbox('force_aspect_ratio1', $settings['force_aspect_ratio1']);
$this->frm->addText('width1', $settings['width2']);
$this->frm->addText('height1', $settings['height2']);
$this->frm->addCheckbox('allow_enlargment2', $settings['allow_enlargment2']);
$this->frm->addCheckbox('force_aspect_ratio2', $settings['force_aspect_ratio2']);
$this->frm->addText('width3', $settings['width3']);
$this->frm->addText('height3', $settings['height3']);
$this->frm->addCheckbox('allow_enlargment3', $settings['allow_enlargment3']);
$this->frm->addCheckbox('force_aspect_ratio3', $settings['force_aspect_ratio3']);
$this->frm->addCheckbox('allow_subscriptions', $settings['allow_subscriptions']);
$this->frm->addCheckbox('moderation', $settings['moderation']);
$this->frm->addCheckbox('notify_by_email_on_new_subscription_to_moderate', $settings['notify_by_email_on_new_subscription_to_moderate']);
$this->frm->addCheckbox('notify_by_email_on_new_subscription', $settings['notify_by_email_on_new_subscription']);
$this->frm->addText('cache_timeout', $settings['cache_timeout']);
$this->frm->addDropdown('zoom_level', 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', $this->get('fork.settings')->get($this->URL->getModule(), 'width'));
$this->frm->addText('height', $this->get('fork.settings')->get($this->URL->getModule(), 'height'));
$this->frm->addDropdown('map_type', 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())), $this->get('fork.settings')->get($this->URL->getModule(), 'map_type_widget', 'roadmap'));
}
示例2: loadForm
/**
* Load the form
*/
protected function loadForm()
{
// create form
$this->frm = new Form('edit');
$this->frm->addText('title', $this->record['title'], null, 'inputText title', 'inputTextError title');
$this->frm->addEditor('text', $this->record['text']);
//$this->frm->addText('link', $this->record['link']);
$this->frm->addText('linktext', $this->record['linktext']);
$this->frm->addImage('image');
// build array with options for the hidden Radiobutton
$RadiobuttonHiddenValues[] = array('label' => Language::lbl('Hidden'), 'value' => 'Y');
$RadiobuttonHiddenValues[] = array('label' => Language::lbl('Published'), 'value' => 'N');
$this->frm->addRadioButton('hidden', $RadiobuttonHiddenValues, $this->record['hidden']);
// get categories
$categories = BackendBlocksModel::getCategories();
$this->frm->addDropdown('category_id', $categories, $this->record['category_id']);
// meta
$this->meta = new Meta($this->frm, $this->record['meta_id'], 'title', true);
$this->meta->setUrlCallBack('Backend\\Modules\\Blocks\\Engine\\Model', 'getUrl', array($this->record['id']));
// redirect
$redirectValue = 'none';
if (isset($this->record['page_id'])) {
$redirectValue = 'internal';
}
if (isset($this->record['link'])) {
$redirectValue = 'external';
}
$redirectValues = array(array('value' => 'none', 'label' => \SpoonFilter::ucfirst(Language::lbl('None'))), array('value' => 'internal', 'label' => \SpoonFilter::ucfirst(Language::lbl('InternalLink')), 'variables' => array('isInternal' => true)), array('value' => 'external', 'label' => \SpoonFilter::ucfirst(Language::lbl('ExternalLink')), 'variables' => array('isExternal' => true)));
$this->frm->addRadiobutton('redirect', $redirectValues, $redirectValue);
$this->frm->addDropdown('internal_redirect', BackendPagesModel::getPagesForDropdown(), $redirectValue == 'internal' ? $this->record['page_id'] : null);
$this->frm->addText('external_redirect', $redirectValue == 'external' ? $this->record['link'] : null, null, null, null, true);
}
示例3: loadDataGrids
/**
* Load the datagrids
*
* @return void
*/
private function loadDataGrids()
{
// load all categories that are in use
$categories = BackendSlideshowModel::getActiveCategories(true);
// run over categories and create datagrid for each one
foreach ($categories as $categoryId => $categoryTitle) {
// create datagrid
$dataGrid = new BackendDataGridDB(BackendSlideshowModel::QRY_DATAGRID_BROWSE, array(BL::getWorkingLanguage(), $categoryId));
// disable paging
$dataGrid->setPaging(false);
// set colum URLs
$dataGrid->setColumnURL('title', BackendModel::createURLForAction('Edit') . '&id=[id]');
// set column functions
$dataGrid->setColumnFunction(array(new BackendDataGridFunctions(), 'getLongDate'), array('[publish_on]'), 'publish_on', true);
$dataGrid->setColumnFunction(array(new BackendDataGridFunctions(), 'getUser'), array('[user_id]'), 'user_id', true);
// set headers
$dataGrid->setHeaderLabels(array('user_id' => \SpoonFilter::ucfirst(BL::lbl('Author')), 'publish_on' => \SpoonFilter::ucfirst(BL::lbl('PublishedOn'))));
// enable drag and drop
$dataGrid->enableSequenceByDragAndDrop();
// our JS needs to know an id, so we can send the new order
$dataGrid->setRowAttributes(array('id' => '[id]'));
$dataGrid->setAttributes(array('data-action' => "GallerySequence"));
// create a column #images
$dataGrid->addColumn('images', ucfirst(BL::lbl('Images')));
$dataGrid->setColumnFunction(array('Backend\\Modules\\Slideshow\\Engine\\Model', 'getImagesByGallery'), array('[id]', true), 'images', true);
// hide columns
$dataGrid->setColumnsHidden(array('category_id', 'sequence', 'filename'));
// add edit column
$dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('Edit') . '&id=[id]', BL::lbl('Edit'));
// set column order
$dataGrid->setColumnsSequence('dragAndDropHandle', 'title', 'images', 'user_id', 'publish_on', 'edit');
// add dataGrid to list
$this->dataGrids[] = array('id' => $categoryId, 'title' => $categoryTitle, 'content' => $dataGrid->getContent());
}
}
示例4: 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'] : '');
$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'] : '');
$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'] : '');
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);
}
示例5: 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, 'inputText title', 'inputTextError 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, 'inputText tagBox', 'inputTextError tagBox');
$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);
}
示例6: loadStatistics
/**
* Load the datagrid for statistics
*/
private function loadStatistics()
{
// fetch the latest mailing
$mailing = BackendMailmotorModel::getSentMailings(1);
// check if a mailing was found
if (empty($mailing)) {
return false;
}
// check if a mailing was set
if (!isset($mailing[0])) {
return false;
}
// show the sent mailings block
$this->tpl->assign('oSentMailings', true);
// fetch the statistics for this mailing
$stats = BackendMailmotorCMHelper::getStatistics($mailing[0]['id'], true);
// reformat the send date
$mailing[0]['sent'] = \SpoonDate::getDate('d-m-Y', $mailing[0]['sent']) . ' ' . BL::lbl('At') . ' ' . \SpoonDate::getDate('H:i', $mailing);
// get results
$results[] = array('label' => BL::lbl('MailmotorLatestMailing'), 'value' => $mailing[0]['name']);
$results[] = array('label' => BL::lbl('MailmotorSendDate'), 'value' => $mailing[0]['sent']);
$results[] = array('label' => BL::lbl('MailmotorSent'), 'value' => $stats['recipients'] . ' (' . $stats['recipients_percentage'] . ')');
$results[] = array('label' => BL::lbl('MailmotorOpened'), 'value' => $stats['unique_opens'] . ' (' . $stats['unique_opens_percentage'] . ')');
$results[] = array('label' => BL::lbl('MailmotorClicks'), 'value' => $stats['clicks_total'] . ' (' . $stats['clicks_percentage'] . ')');
// there are some results
if (!empty($results)) {
// get the datagrid
$dataGrid = new BackendDataGridArray($results);
// no pagination
$dataGrid->setPaging(false);
// parse the datagrid
$this->tpl->assign('dgMailmotorStatistics', $dataGrid->getContent());
}
}
示例7: loadDatagrids
/**
* Loads the dataGrids
*/
private function loadDatagrids()
{
// load all categories
$categories = BackendFaqModel::getCategories(true);
// loop categories and create a dataGrid for each one
foreach ($categories as $categoryId => $categoryTitle) {
$dataGrid = new BackendDataGridDB(BackendFaqModel::QRY_DATAGRID_BROWSE, array(BL::getWorkingLanguage(), $categoryId));
$dataGrid->setAttributes(array('class' => 'dataGrid sequenceByDragAndDrop'));
$dataGrid->setColumnsHidden(array('category_id', 'sequence'));
$dataGrid->addColumn('dragAndDropHandle', null, '<span>' . BL::lbl('Move') . '</span>');
$dataGrid->setColumnsSequence('dragAndDropHandle');
$dataGrid->setColumnAttributes('question', array('class' => 'title'));
$dataGrid->setColumnAttributes('dragAndDropHandle', array('class' => 'dragAndDropHandle'));
$dataGrid->setRowAttributes(array('id' => '[id]'));
// check if this action is allowed
if (BackendAuthentication::isAllowedAction('Edit')) {
$dataGrid->setColumnURL('question', BackendModel::createURLForAction('Edit') . '&id=[id]');
$dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('Edit') . '&id=[id]', BL::lbl('Edit'));
}
// add dataGrid to list
$this->dataGrids[] = array('id' => $categoryId, 'title' => $categoryTitle, 'content' => $dataGrid->getContent());
}
// set empty datagrid
$this->emptyDatagrid = new BackendDataGridArray(array(array('dragAndDropHandle' => '', 'question' => BL::msg('NoQuestionInCategory'), 'edit' => '')));
$this->emptyDatagrid->setAttributes(array('class' => 'dataGrid sequenceByDragAndDrop emptyGrid'));
$this->emptyDatagrid->setHeaderLabels(array('edit' => null, 'dragAndDropHandle' => null));
}
示例8: loadForm
/**
* Load the form
*/
protected function loadForm()
{
$groupCheckboxes = array();
// set hidden values
$rbtActiveValues = array();
$rbtActiveValues[] = array('label' => ucfirst(BL::lbl('Active')), 'value' => 'Y');
$rbtActiveValues[] = array('label' => ucfirst(BL::lbl('NotActive')), 'value' => 'N');
// create form
$this->frm = new BackendForm('edit');
$this->frm->addText('name', $this->record['name']);
$this->frm->addText('email', $this->record['email']);
$this->frm->addRadiobutton('active', $rbtActiveValues, $this->record['active']);
//--Get all the groups
$groups = BackendMailengineModel::getAllGroups();
//--Check if there are groups
if (!empty($groups)) {
//--Loop all the users
foreach ($groups as $key => &$group) {
$groupCheckboxes[] = array("label" => $group["title"], "value" => $group["id"]);
}
//--Get the users from the group
$groupsUser = BackendMailengineModel::getGroupsForUser($this->id);
//--Create a selected-array
$groupCheckboxesSelected = count($groupsUser) > 0 ? array_keys($groupsUser) : null;
//--Add multicheckboxes to form
$this->frm->addMultiCheckbox("groups", $groupCheckboxes, $groupCheckboxesSelected);
}
}
示例9: loadForm
/**
* Load the form
*/
protected function loadForm()
{
$rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
$rbtHiddenValues[] = array('label' => BL::lbl('Hidden'), 'value' => 'Y');
$this->frm = new BackendForm('edit');
$this->frm->addText('company', $this->record['company']);
$this->frm->addText('name', $this->record['name']);
$this->frm->addText('firstname', $this->record['firstname']);
$this->frm->addText('email', $this->record['email']);
$this->frm->addText('address', $this->record['address']);
$this->frm->addText('zipcode', $this->record['zipcode']);
$this->frm->addText('city', $this->record['city']);
// $this->frm->addText('country', $this->record['country']);
$this->frm->addDropdown('country', Intl::getRegionBundle()->getCountryNames(BL::getInterfaceLanguage()), $this->record['country']);
$this->frm->addText('phone', $this->record['phone']);
$this->frm->addText('fax', $this->record['fax']);
$this->frm->addText('website', $this->record['website']);
$this->frm->addText('vat', $this->record['vat']);
$this->frm->addTextArea('zipcodes', $this->record['zipcodes']);
$this->frm->addText('remark', $this->record['remark']);
//$this->frm->addText('assort', $this->record['assort']);
//$this->frm->addText('open', $this->record['open']);
//$this->frm->addText('closed', $this->record['closed']);
//$this->frm->addText('visit', $this->record['visit']);
//$this->frm->addText('size', $this->record['size']);
//$this->frm->addEditor('text', $this->record['text']);
$this->frm->addImage('image');
$this->frm->addCheckbox('delete_image');
$this->frm->addRadiobutton('hidden', $rbtHiddenValues, $this->record['hidden']);
foreach ((array) BackendModel::get('fork.settings')->get('Core', 'languages') as $key => $language) {
$addressesLanguage = BackendAddressesModel::getLanguage($this->id, $language);
$fieldText = $this->frm->addEditor("text_" . strtolower($language), $addressesLanguage['text']);
$fieldOpeningHours = $this->frm->addEditor("opening_hours_" . strtolower($language), $addressesLanguage['opening_hours']);
$this->fieldLanguages[$key]["key"] = $key;
$this->fieldLanguages[$key]["language"] = $language;
$this->fieldLanguages[$key]["text"] = $fieldText->parse();
$this->fieldLanguages[$key]["opening_hours"] = $fieldOpeningHours->parse();
}
//--Get all the groups
$groups = BackendAddressesModel::getAllGroups();
if (!empty($groups)) {
//--Loop all the users
foreach ($groups as &$group) {
$groupCheckboxes[] = array("label" => $group["title"], "value" => $group["id"]);
}
//--Get the users from the group
$groupsAddress = BackendAddressesModel::getGroupsForAddress($this->id);
//--Create a selected-array
$groupCheckboxesSelected = count($groupsAddress) > 0 ? array_keys($groupsAddress) : null;
//--Add multicheckboxes to form
$this->frm->addMultiCheckbox("groups", $groupCheckboxes, $groupCheckboxesSelected);
}
$groups2 = BackendAddressesModel::getAllGroupsTreeArray();
$this->tpl->assign('groups2', $groups2);
$this->tpl->assign('groups2selected', $groupCheckboxesSelected == null ? array() : $groupCheckboxesSelected);
// meta
$this->meta = new BackendMeta($this->frm, $this->record['meta_id'], 'company', true);
$this->meta->setUrlCallback('Backend\\Modules\\Addresses\\Engine\\Model', 'getUrl', array($this->record['id']));
}
示例10: 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')));
}
示例11: 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())), $this->get('fork.settings')->get($this->URL->getModule(), 'map_type_widget', 'roadmap'));
}
示例12: loadDatagrid
private function loadDatagrid()
{
// create datagrid
$this->dgRooms = new BackendDataGridDB(BackendHotelsModel::QRY_DATAGRID_BROWSE_ROOMS, array($this->id));
// set column URLs
$this->dgRooms->setColumnURL('title', BackendModel::createURLForAction('RoomEdit') . '&id=[id]');
$this->dgRooms->setColumnFunction(array(new BackendDataGridFunctions(), 'showImage'), array(FRONTEND_FILES_URL . '/rooms/images/64x64', '[image]'), 'image', true);
// add edit column
$this->dgRooms->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('RoomEdit') . '&id=[id]', BL::lbl('RoomEdit'));
}
示例13: loadDataGrid
/**
* Load the datagrids
*/
private function loadDataGrid()
{
$this->dataGrid = new BackendDataGridDB(BackendContentBlocksModel::QRY_BROWSE, array('active', BL::getWorkingLanguage()));
$this->dataGrid->setSortingColumns(array('title'));
// check if this action is allowed
if (BackendAuthentication::isAllowedAction('Edit')) {
$this->dataGrid->setColumnURL('title', BackendModel::createURLForAction('Edit') . '&id=[id]');
$this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('Edit') . '&id=[id]', BL::lbl('Edit'));
}
}
示例14: loadForm
/**
* Load the form
*/
private function loadForm()
{
// set hidden values
$rbtHiddenValues[] = array('label' => BL::lbl('Hidden', $this->URL->getModule()), 'value' => 'Y');
$rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
// create form
$this->frm = new BackendForm('add_category');
$this->frm->addText('title', null, 255, 'inputText title', 'inputTextError title');
$this->frm->addRadiobutton('hidden', $rbtHiddenValues, 'N');
}
示例15: 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]');
}
}