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


PHP BL::lbl方法代码示例

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


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

示例1: parseChartData

 /**
  * Parses the data to make the chart with
  */
 private function parseChartData()
 {
     $maxYAxis = 2;
     $metrics = array('visitors', 'pageviews');
     $graphData = array();
     $metricsPerDay = BackendAnalyticsModel::getMetricsPerDay($metrics, $this->startTimestamp, $this->endTimestamp);
     foreach ($metrics as $i => $metric) {
         $graphData[$i] = array();
         $graphData[$i]['title'] = $metric;
         $graphData[$i]['label'] = SpoonFilter::ucfirst(BL::lbl(SpoonFilter::toCamelCase($metric)));
         $graphData[$i]['i'] = $i + 1;
         $graphData[$i]['data'] = array();
         foreach ($metricsPerDay as $j => $data) {
             // cast SimpleXMLElement to array
             $data = (array) $data;
             // build array
             $graphData[$i]['data'][$j]['date'] = (int) $data['timestamp'];
             $graphData[$i]['data'][$j]['value'] = (string) $data[$metric];
         }
     }
     // loop the metrics
     foreach ($graphData as $metric) {
         foreach ($metric['data'] as $data) {
             // get the maximum value
             if ((int) $data['value'] > $maxYAxis) {
                 $maxYAxis = (int) $data['value'];
             }
         }
     }
     $this->tpl->assign('maxYAxis', $maxYAxis);
     $this->tpl->assign('tickInterval', $maxYAxis == 2 ? '1' : '');
     $this->tpl->assign('graphData', $graphData);
 }
开发者ID:naujasdizainas,项目名称:forkcms,代码行数:36,代码来源:all_pages.php

示例2: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     $this->imageIsAllowed = BackendModel::getModuleSetting($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', BackendModel::getModuleSetting($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);
 }
开发者ID:naujasdizainas,项目名称:forkcms,代码行数:33,代码来源:add.php

示例3: 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') . '&amp;id=[id]');
             $dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit') . '&amp;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));
 }
开发者ID:naujasdizainas,项目名称:forkcms,代码行数:30,代码来源:index.php

示例4: loadDataGrid

 /**
  * Loads the datagrid with the groups
  *
  * @return	void
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new BackendDataGridDB(BackendMailmotorModel::QRY_DATAGRID_BROWSE_GROUPS);
     $this->dataGrid->setColumnsHidden(array('language', 'is_default'));
     // sorting columns
     $this->dataGrid->setSortingColumns(array('name', 'created_on'), 'created_on');
     $this->dataGrid->setSortParameter('desc');
     // set colum URLs
     $this->dataGrid->setColumnURL('name', BackendModel::createURLForAction('addresses') . '&amp;group_id=[id]');
     // set the datagrid ID so we don't run into trouble with multiple datagrids that use mass actions
     $this->dataGrid->setAttributes(array('id' => 'dgGroups'));
     // add the multicheckbox column
     $this->dataGrid->setMassActionCheckboxes('checkbox', '[id]', BackendMailmotorModel::getDefaultGroupIds());
     $this->dataGrid->setColumnsSequence('checkbox', 'name', 'created_on', 'language');
     // add mass action dropdown
     $ddmMassAction = new SpoonFormDropdown('action', array('delete' => BL::lbl('Delete')), 'delete');
     $this->dataGrid->setMassAction($ddmMassAction);
     // set column functions
     $this->dataGrid->setColumnFunction(array('BackendDataGridFunctions', 'getTimeAgo'), array('[created_on]'), 'created_on', true);
     // add delete column
     $this->dataGrid->addColumnAction('custom_fields', null, BL::lbl('CustomFields'), BackendModel::createURLForAction('custom_fields') . '&amp;group_id=[id]', BL::lbl('CustomFields'), array('class' => 'button icon iconEdit linkButton'));
     $this->dataGrid->addColumnAction('export', null, BL::lbl('Export'), BackendModel::createURLForAction('export_addresses') . '&amp;id=[id]', BL::lbl('Export'), array('class' => 'button icon iconExport linkButton'));
     $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit_group') . '&amp;id=[id]', BL::lbl('Edit'));
     // add styles
     $this->dataGrid->setColumnAttributes('name', array('class' => 'title'));
     // set paging limit
     $this->dataGrid->setPagingLimit(self::PAGING_LIMIT);
 }
开发者ID:netconstructor,项目名称:forkcms,代码行数:34,代码来源:groups.php

示例5: parse

 /**
  * Parse this page
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent parse
     parent::parse();
     // get results
     $results = BackendAnalyticsModel::getLandingPages($this->startTimestamp, $this->endTimestamp);
     // there are some results
     if (!empty($results)) {
         // get the datagrid
         $dataGrid = new BackendDataGridArray($results);
         // hide columns
         $dataGrid->setColumnsHidden('start_date', 'end_date', 'updated_on', 'page_encoded');
         // set headers values
         $headers['page_path'] = ucfirst(BL::lbl('Page'));
         // set headers
         $dataGrid->setHeaderLabels($headers);
         // set url
         $dataGrid->setColumnURL('page_path', BackendModel::createURLForAction('detail_page') . '&amp;page=[page_encoded]');
         // add the multicheckbox column
         $dataGrid->setMassActionCheckboxes('checkbox', '[id]');
         // add mass action dropdown
         $ddmMassAction = new SpoonFormDropdown('action', array('delete_landing_page' => BL::lbl('Delete')), 'delete');
         $dataGrid->setMassAction($ddmMassAction);
         // parse the datagrid
         $this->tpl->assign('dgPages', $dataGrid->getContent());
     }
 }
开发者ID:netconstructor,项目名称:forkcms,代码行数:32,代码来源:landing_pages.php

示例6: parseLineChartData

 /**
  * Parses the data to make the line chart
  *
  * @param array $metricsPerDay All needed metrics grouped by day.
  */
 private function parseLineChartData($metricsPerDay)
 {
     $maxYAxis = 2;
     $metrics = array('pageviews');
     $graphData = array();
     foreach ($metrics as $i => $metric) {
         // build graph data array
         $graphData[$i] = array();
         $graphData[$i]['title'] = $metric;
         $graphData[$i]['label'] = SpoonFilter::ucfirst(BL::lbl(SpoonFilter::toCamelCase($metric)));
         $graphData[$i]['data'] = array();
         foreach ($metricsPerDay as $j => $data) {
             // cast SimpleXMLElement to array
             $data = (array) $data;
             $graphData[$i]['data'][$j]['date'] = (int) $data['timestamp'];
             $graphData[$i]['data'][$j]['value'] = (string) $data[$metric];
         }
     }
     // loop the metrics
     foreach ($graphData as $metric) {
         foreach ($metric['data'] as $data) {
             // get the maximum value
             if ((int) $data['value'] > $maxYAxis) {
                 $maxYAxis = (int) $data['value'];
             }
         }
     }
     $this->tpl->assign('maxYAxis', $maxYAxis);
     $this->tpl->assign('tickInterval', $maxYAxis == 2 ? '1' : '');
     $this->tpl->assign('lineGraphData', $graphData);
 }
开发者ID:naujasdizainas,项目名称:forkcms,代码行数:36,代码来源:detail_page.php

示例7: execute

 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // fork is no longer authorized to collect analytics data
     if (BackendAnalyticsHelper::getStatus() == 'UNAUTHORIZED') {
         // remove all parameters from the module settings
         BackendModel::setModuleSetting($this->getModule(), 'session_token', null);
         BackendModel::setModuleSetting($this->getModule(), 'account_name', null);
         BackendModel::setModuleSetting($this->getModule(), 'table_id', null);
         BackendModel::setModuleSetting($this->getModule(), 'profile_title', null);
         // remove cache files
         BackendAnalyticsModel::removeCacheFiles();
         // clear tables
         BackendAnalyticsModel::clearTables();
         // return status
         $this->output(self::OK, array('status' => 'unauthorized', 'message' => BL::msg('Redirecting')), 'No longer authorized.');
     }
     // get data
     $this->getData();
     // get html
     $referrersHtml = $this->parseReferrers();
     $keywordsHtml = $this->parseKeywords();
     // return status
     $this->output(self::OK, array('status' => 'success', 'referrersHtml' => $referrersHtml, 'keywordsHtml' => $keywordsHtml, 'date' => BL::lbl('Today'), 'message' => BL::msg('RefreshedTrafficSources')), 'Data has been retrieved.');
 }
开发者ID:netconstructor,项目名称:forkcms,代码行数:31,代码来源:refresh_traffic_sources.php

示例8: loadDataGrids

 /**
  * Load the datagrids
  *
  * @return	void
  */
 private function loadDataGrids()
 {
     // load all categories
     $categories = BackendFaqModel::getCategories();
     // run over categories and create datagrid for each one
     foreach ($categories as $category) {
         // create datagrid
         $dataGrid = new BackendDataGridDB(BackendFaqModel::QRY_DATAGRID_BROWSE, array(BL::getWorkingLanguage(), $category['id']));
         // set attributes
         $dataGrid->setAttributes(array('class' => 'dataGrid sequenceByDragAndDrop'));
         // disable paging
         $dataGrid->setPaging(false);
         // set colum URLs
         $dataGrid->setColumnURL('question', BackendModel::createURLForAction('edit') . '&amp;id=[id]');
         // set colums hidden
         $dataGrid->setColumnsHidden(array('category_id', 'sequence'));
         // add edit column
         $dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit') . '&amp;id=[id]', BL::lbl('Edit'));
         // add a column for the handle, so users have something to hold while draging
         $dataGrid->addColumn('dragAndDropHandle', null, '<span>' . BL::lbl('Move') . '</span>');
         // make sure the column with the handler is the first one
         $dataGrid->setColumnsSequence('dragAndDropHandle');
         // add a class on the handler column, so JS knows this is just a handler
         $dataGrid->setColumnAttributes('dragAndDropHandle', array('class' => 'dragAndDropHandle'));
         // our JS needs to know an id, so we can send the new order
         $dataGrid->setRowAttributes(array('id' => '[id]'));
         // add datagrid to list
         $this->dataGrids[] = array('id' => $category['id'], 'name' => $category['name'], 'content' => $dataGrid->getContent());
     }
 }
开发者ID:netconstructor,项目名称:forkcms,代码行数:35,代码来源:index.php

示例9: 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:nickmancol,项目名称:forkcms-rhcloud,代码行数:11,代码来源:statistics.php

示例10: setStatisticsLink

 /**
  * Sets a link to the campaign statistics if it contains sent mailings
  *
  * @param int $id The ID of the campaign.
  * @return string
  */
 public static function setStatisticsLink($id)
 {
     // build the link HTML
     $html = '<a href="' . BackendModel::createURLForAction('statistics_campaign') . '&amp;id=' . $id . '" class="button icon iconStats linkButton"><span>' . BL::lbl('Statistics') . '</span></a>';
     // check if this campaign has sent mailings
     $hasSentMailings = BackendMailmotorModel::existsSentMailingsByCampaignID($id) > 0 ? true : false;
     // return the result
     return $hasSentMailings ? $html : '';
 }
开发者ID:naujasdizainas,项目名称:forkcms,代码行数:15,代码来源:campaigns.php

示例11: loadDataGrid

 /**
  * Load the datagrids
  *
  * @return	void
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new BackendDataGridDB(BackendPagesModel::QRY_BROWSE_TEMPLATES, array($this->selectedTheme));
     // set colum URLs
     $this->dataGrid->setColumnURL('title', BackendModel::createURLForAction('edit_template') . '&amp;id=[id]');
     // add edit column
     $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit_template') . '&amp;id=[id]', BL::lbl('Edit'));
 }
开发者ID:netconstructor,项目名称:forkcms,代码行数:14,代码来源:templates.php

示例12: 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))), BackendModel::getModuleSetting($this->URL->getModule(), 'zoom_level_widget', 13));
     $this->frm->addText('width_widget', BackendModel::getModuleSetting($this->URL->getModule(), 'width_widget'));
     $this->frm->addText('height_widget', BackendModel::getModuleSetting($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())), BackendModel::getModuleSetting($this->URL->getModule(), 'map_type_widget', 'roadmap'));
 }
开发者ID:nickmancol,项目名称:forkcms-rhcloud,代码行数:12,代码来源:settings.php

示例13: 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') . '&amp;id=[id]');
         $this->dataGrid->setColumnURL('num_users', BackendModel::createURLForAction('edit') . '&amp;id=[id]#tabUsers');
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit') . '&amp;id=[id]');
     }
 }
开发者ID:naujasdizainas,项目名称:forkcms,代码行数:13,代码来源:index.php

示例14: loadDataGrid

 /**
  * Load the datagrid
  *
  * @return	void
  */
 public function loadDataGrid()
 {
     // create datagrid with overview of groups
     $this->dataGrid = new BackendDataGridDB(BackendGroupsModel::QRY_BROWSE);
     // set collumn URLs
     $this->dataGrid->setColumnURL('name', BackendModel::createURLForAction('edit') . '&amp;id=[id]');
     $this->dataGrid->setColumnURL('num_users', BackendModel::createURLForAction('edit') . '&amp;id=[id]#tabUsers');
     // add edit column
     $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit') . '&amp;id=[id]');
 }
开发者ID:netconstructor,项目名称:forkcms,代码行数:15,代码来源:index.php

示例15: 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') . '&amp;id=[id]');
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit') . '&amp;id=[id]', BL::lbl('Edit'));
     }
 }
开发者ID:naujasdizainas,项目名称:forkcms,代码行数:13,代码来源:index.php


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