當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ActionEdit::execute方法代碼示例

本文整理匯總了PHP中Backend\Core\Engine\Base\ActionEdit::execute方法的典型用法代碼示例。如果您正苦於以下問題:PHP ActionEdit::execute方法的具體用法?PHP ActionEdit::execute怎麽用?PHP ActionEdit::execute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Backend\Core\Engine\Base\ActionEdit的用法示例。


在下文中一共展示了ActionEdit::execute方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     $this->id = $this->getParameter('id', 'int');
     $error = $this->getParameter('error', 'string');
     $this->loadAuthenticatedUser();
     // If id and error parameters are not set we'll assume the user logged in
     // and has been redirected to this action by the authentication index action.
     // When this is the case the user will be redirected to the index action of this module.
     // An action to which he may not have any user rights.
     // Redirect to the user's own profile instead to avoid unnessary words.
     if ($this->id === null && $error === null && $this->authenticatedUser->getUserId()) {
         $this->redirect(BackendModel::createURLForAction('Edit') . '&id=' . $this->authenticatedUser->getUserId());
     }
     // does the user exists
     if ($this->id !== null && BackendUsersModel::exists($this->id)) {
         parent::execute();
         $this->record = (array) BackendUsersModel::get($this->id);
         $this->loadForm();
         $this->validateForm();
         $this->parse();
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
     }
 }
開發者ID:newaltcoin,項目名稱:forkcms,代碼行數:28,代碼來源:Edit.php

示例2: execute

 public function execute()
 {
     parent::execute();
     try {
         $id = Uuid::fromString($this->getParameter('id', 'string'));
         $teamMember = $this->get('team_repository')->find($id);
     } catch (\Exception $e) {
         return $this->redirect(Model::createURLForAction('Index') . '&error=non-existing');
     }
     $form = new TeamType('edit', $teamMember);
     if ($form->handle()) {
         $teamMember = $form->getData();
         $this->get('team_repository')->save($teamMember);
         return $this->redirect(Model::createURLForAction('Index') . '&report=edited' . '&highlight=row-' . $teamMember->getId());
     }
     // assign the detail url to the template if available
     $url = Model::getURLForBlock($this->URL->getModule(), 'Detail');
     if (Model::getURL(404) != $url) {
         $this->tpl->assign('detailURL', SITE_URL . $url);
     }
     $form->parse($this->tpl);
     $this->tpl->assign('teamMember', $teamMember->toArray());
     $this->parse();
     $this->display();
 }
開發者ID:WouterSioen,項目名稱:fork-cms-module-team,代碼行數:25,代碼來源:Edit.php

示例3: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     $this->id = $this->getParameter('id', 'int');
     // does the item exists
     if ($this->id !== null && BackendLocationModel::exists($this->id)) {
         $this->header->addJS(FrontendLocationModel::getPathToMapStyles());
         parent::execute();
         // define Google Maps API key
         $apikey = $this->get('fork.settings')->get('Core', 'google_maps_key');
         // check Google Maps API key, otherwise redirect to settings
         if ($apikey === null) {
             $this->redirect(BackendModel::createURLForAction('Index', 'Settings'));
         }
         // add js
         $this->header->addJS('https://maps.googleapis.com/maps/api/js?key=' . $apikey, null, false, true, false);
         $this->loadData();
         $this->loadForm();
         $this->validateForm();
         $this->loadSettingsForm();
         $this->parse();
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
     }
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:28,代碼來源:Edit.php

示例4: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->getCompressionParameters();
     $this->parse();
     $this->display();
 }
開發者ID:guytarded,項目名稱:fork-cms-module-compression,代碼行數:10,代碼來源:Settings.php

示例5: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadData();
     $this->parse();
     $this->display();
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:10,代碼來源:ExportThemeTemplates.php

示例6: execute

 /**
  * Execute the action
  *
  * @return  void
  */
 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exists
     if ($this->id !== null && BackendSlideshowModel::existsGallery($this->id)) {
         // call parent, this will probably add some general CSS/JS or other required files
         parent::execute();
         // get all data for the item we want to edit
         $this->getData();
         // load the form
         $this->loadForm();
         // load datagrids
         $this->loadDataGrid();
         // validate the form
         $this->validateForm();
         // parse
         $this->parse();
         // display the page
         $this->display();
     } else {
         // no item found, throw an exception, because somebody is fucking with our URL
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
     }
 }
開發者ID:bart-webleads,項目名稱:fork-cms-module-slideshow,代碼行數:30,代碼來源:Edit.php

示例7: execute

 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exists?
     if ($this->id !== null && BackendGalleriaModel::existsAlbum($this->id)) {
         // call parent, this will probably add some general CSS/JS or other required files
         parent::execute();
         // get all data for the item we want to edit
         $this->getData();
         // load the form
         $this->loadForm();
         $this->loadFormAddImage();
         $this->loadFormDeleteImage();
         // validate the form
         $this->validateForm();
         $this->validateFormAddImage();
         $this->validateFormDeleteImage();
         // parse the form
         $this->parse();
         // display the page
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('albums') . '&error=non-existing');
     }
 }
開發者ID:Brandberries,項目名稱:forkcms-galleria,代碼行數:26,代碼來源:EditAlbum.php

示例8: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // load record
     $this->loadData();
     // add js
     $this->header->addJS('jstree/jquery.tree.js', null, false);
     $this->header->addJS('jstree/lib/jquery.cookie.js', null, false);
     $this->header->addJS('jstree/plugins/jquery.tree.cookie.js', null, false);
     // add css
     $this->header->addCSS('/src/Backend/Modules/Pages/Js/jstree/themes/fork/style.css', null, true);
     // get the templates
     $this->templates = BackendExtensionsModel::getTemplates();
     // set the default template as checked
     $this->templates[$this->record['template_id']]['checked'] = true;
     // homepage?
     if ($this->id == 1) {
         // loop and set disabled state
         foreach ($this->templates as &$row) {
             $row['disabled'] = $row['has_block'];
         }
     }
     // get the extras
     $this->extras = BackendExtensionsModel::getExtras();
     $this->loadForm();
     $this->loadDrafts();
     $this->loadRevisions();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
開發者ID:biggtfish,項目名稱:forkcms,代碼行數:34,代碼來源:Edit.php

示例9: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:11,代碼來源:Settings.php

示例10: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     set_time_limit(0);
     $this->fs = new Filesystem();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
開發者ID:arashrasoulzadeh,項目名稱:forkcms,代碼行數:13,代碼來源:ImportWordpress.php

示例11: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->header->addJS('ThemeTemplate.js');
     $this->loadData();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:13,代碼來源:EditThemeTemplate.php

示例12: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->groupId = \SpoonFilter::getGetValue('group_id', null, 0, 'int');
     $this->downloadExampleFile();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:13,代碼來源:ImportAddresses.php

示例13: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadData();
     $this->loadForm();
     $this->validateForm();
     $this->header->addJsData("Media", "mediaModule", (string) $this->getModule());
     $this->header->addJsData("Media", "mediaAction", (string) $this->getAction());
     $this->header->addJsData("Media", "mediaId", (int) $this->id);
     $this->header->addJsData("Media", "mediaType", (string) 'Agenda');
     $this->parse();
     $this->display();
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:16,代碼來源:Edit.php

示例14: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if (BackendMailmotorModel::existsMailing($this->id)) {
         parent::execute();
         $this->getData();
         $this->parse();
         $this->display(BACKEND_MODULES_PATH . '/Mailmotor/Layout/Templates/EditMailingIframe.tpl');
     } else {
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
     }
 }
開發者ID:newaltcoin,項目名稱:forkcms,代碼行數:16,代碼來源:EditMailingIframe.php

示例15: execute

 /**
  * Execute the action
  */
 public function execute()
 {
     $this->id = $this->getParameter('id', 'int');
     if ($this->id !== null && BackendCatalogModel::existsFile($this->id)) {
         parent::execute();
         $this->getData();
         $this->loadForm();
         $this->validateForm();
         $this->parse();
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:17,代碼來源:EditFile.php


注:本文中的Backend\Core\Engine\Base\ActionEdit::execute方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。