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


PHP Authentication::isAllowedAction方法代码示例

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


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

示例1: 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:bwgraves,项目名称:forkcms,代码行数:30,代码来源:Index.php

示例2: parse

 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // assign the data
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('showFaqDeleteCategory', BackendFaqModel::deleteCategoryAllowed($this->id) && BackendAuthentication::isAllowedAction('DeleteCategory'));
 }
开发者ID:bwgraves,项目名称:forkcms,代码行数:10,代码来源:EditCategory.php

示例3: 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:forkcms,项目名称:forkcms,代码行数:13,代码来源:Index.php

示例4: 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:bwgraves,项目名称:forkcms,代码行数:13,代码来源:Index.php

示例5: parse

 /**
  * Parse & display the page
  */
 protected function parse()
 {
     parent::parse();
     $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false);
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('AddCategory') && $this->multipleCategoriesAllowed) {
         $this->tpl->assign('showAgendaAddCategory', true);
     } else {
         $this->tpl->assign('showAgendaAddCategory', false);
     }
 }
开发者ID:Comsa-Veurne,项目名称:modules,代码行数:14,代码来源:Categories.php

示例6: loadDataGrid

 /**
  * Load the dataGrid
  */
 protected function loadDataGrid()
 {
     $this->dataGrid = new DataGridDB(BackendInstagramModel::QRY_DATAGRID_BROWSE, Language::getWorkingLanguage());
     // Reform date
     $this->dataGrid->setColumnFunction(array('Backend\\Core\\Engine\\DataGridFunctions', 'getLongDate'), array('[created_on]'), 'created_on', true);
     // Check if this action is allowed
     if (Authentication::isAllowedAction('Edit')) {
         $this->dataGrid->addColumn('edit', null, Language::lbl('Edit'), Model::createURLForAction('Edit') . '&amp;id=[id]', Language::lbl('Edit'));
         $this->dataGrid->setColumnURL('username', Model::createURLForAction('Edit') . '&amp;id=[id]');
     }
 }
开发者ID:jeroendesloovere,项目名称:fork-cms-module-instagram,代码行数:14,代码来源:Index.php

示例7: loadDataGrid

 /**
  * Load the dataGrid
  */
 private function loadDataGrid()
 {
     $this->dataGrid = new DataGridDB(BackendBlocksModel::QRY_DATAGRID_BROWSE_CATEGORIES, Language::getWorkingLanguage());
     // check if this action is allowed
     if (Authentication::isAllowedAction('EditCategory')) {
         $this->dataGrid->addColumn('edit', null, Language::lbl('Edit'), Model::createURLForAction('EditCategory') . '&amp;id=[id]', Language::lbl('Edit'));
         $this->dataGrid->setColumnURL('title', Model::createURLForAction('EditCategory') . '&amp;id=[id]');
     }
     // sequence
     $this->dataGrid->enableSequenceByDragAndDrop();
     $this->dataGrid->setAttributes(array('data-action' => 'sequence_categories'));
 }
开发者ID:Comsa-Veurne,项目名称:modules,代码行数:15,代码来源:Categories.php

示例8: loadDataGrid

 /**
  * Load the dataGrid
  */
 private function loadDataGrid()
 {
     $this->dataGrid = new BackendDataGridDB(BackendCatalogModel::QRY_DATAGRID_BROWSE_BRANDS, array(BL::getWorkingLanguage()));
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('EditBrand')) {
         $this->dataGrid->setColumnURL('title', BackendModel::createURLForAction('edit_brand') . '&amp;id=[id]');
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit_brand') . '&amp;id=[id]', BL::lbl('Edit'));
     }
     // sequence
     $this->dataGrid->enableSequenceByDragAndDrop();
     $this->dataGrid->setAttributes(array('data-action' => 'SequenceBrands'));
 }
开发者ID:Comsa-Veurne,项目名称:modules,代码行数:15,代码来源:Brands.php

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

示例10: parse

 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // assign the data
     $this->tpl->assign('item', $this->record);
     $this->tpl->assign('showFaqDeleteCategory', BackendFaqModel::deleteCategoryAllowed($this->id) && BackendAuthentication::isAllowedAction('DeleteCategory'));
     $url = BackendModel::getURLForBlock($this->URL->getModule(), 'Category');
     $url404 = BackendModel::getURL(404);
     if ($url404 != $url) {
         $this->tpl->assign('detailURL', SITE_URL . $url);
     }
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:15,代码来源:EditCategory.php

示例11: loadDataGrid

 /**
  * Load the datagrid
  */
 protected function loadDataGrid()
 {
     $this->dataGrid = new BackendDataGridDB(BackendMailengineModel::QRY_DATAGRID_BROWSE_TEMPLATES);
     // sorting columns
     $this->dataGrid->setSortingColumns(array('title'));
     $this->dataGrid->setSortParameter('asc');
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('EditTemplate')) {
         $this->dataGrid->setColumnURL('title', BackendModel::createURLForAction('edit_template') . '&amp;id=[id]');
         $this->dataGrid->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit_template') . '&amp;id=[id]', BL::lbl('Edit'));
     }
 }
开发者ID:Comsa-Veurne,项目名称:modules,代码行数:15,代码来源:Templates.php

示例12: loadDataGrid

 /**
  * Load the dataGrid
  */
 protected function loadDataGrid()
 {
     $this->dataGrid = new DataGridDB(BackendBlocksModel::QRY_DATAGRID_BROWSE, Language::getWorkingLanguage());
     // reform date
     $this->dataGrid->setColumnFunction(array('Backend\\Core\\Engine\\DataGridFunctions', 'getLongDate'), array('[created_on]'), 'created_on', true);
     // drag and drop sequencing
     $this->dataGrid->enableSequenceByDragAndDrop();
     // check if this action is allowed
     if (Authentication::isAllowedAction('Edit')) {
         $this->dataGrid->addColumn('edit', null, Language::lbl('Edit'), Model::createURLForAction('Edit') . '&amp;id=[id]', Language::lbl('Edit'));
         $this->dataGrid->setColumnURL('title', Model::createURLForAction('Edit') . '&amp;id=[id]');
     }
 }
开发者ID:Comsa-Veurne,项目名称:modules,代码行数:16,代码来源:Index.php

示例13: loadDataGrid

 /**
  * Loads the datagrids
  */
 private function loadDataGrid()
 {
     // create datagrid
     $this->dataGrid = new DataGridDB($this->get('team_repository')->getDataGridQuery(), ['language' => Language::getWorkingLanguage()]);
     $this->dataGrid->setColumnFunction(['Rhumsaa\\Uuid\\Uuid', 'fromBytes'], ['[id]'], 'id', true);
     $this->dataGrid->setColumnFunction([new DataGridFunctions(), 'getLongDate'], ['[created_on]'], 'created_on', true);
     // check if this action is allowed
     if (Authentication::isAllowedAction('Edit')) {
         // add column
         $this->dataGrid->addColumn('edit', null, Language::lbl('Edit'), Model::createURLForAction('Edit'), Language::lbl('Edit'));
         $this->dataGrid->setColumnFunction([__CLASS__, 'addIdToEditUrl'], ['[edit]', '[id]'], 'edit', true);
     }
     $this->tpl->assign('dataGrid', (string) $this->dataGrid->getContent());
 }
开发者ID:WouterSioen,项目名称:fork-cms-module-team,代码行数:17,代码来源:Index.php

示例14: 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

示例15: checkSettings

 /**
  * Checks the settings and optionally returns an array with warnings
  *
  * @return array
  */
 public static function checkSettings()
 {
     $warnings = array();
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('Settings', 'Mailmotor')) {
         // analytics session token
         if (BackendModel::get('fork.settings')->get('Mailmotor', 'cm_account') == false) {
             $warnings[] = array('message' => sprintf(BL::err('AnalysisNoCMAccount', 'Mailmotor'), BackendModel::createURLForAction('Settings', 'Mailmotor')));
         } elseif (BackendModel::get('fork.settings')->get('Mailmotor', 'cm_client_id') == '') {
             // add warning
             $warnings[] = array('message' => sprintf(BL::err('AnalysisNoCMClientID', 'Mailmotor'), BackendModel::createURLForAction('Settings', 'Mailmtor')));
         }
     }
     return $warnings;
 }
开发者ID:newaltcoin,项目名称:forkcms,代码行数:20,代码来源:Model.php


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