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


PHP BaseController::editAction方法代码示例

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


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

示例1: editAction

 /**
  * We're never creating leave directly, so die 
  * if there's no associated user
  *
  * @param Leave $model
  */
 public function editAction($model = null)
 {
     if (!(int) $this->_getParam('id')) {
         throw new Exception("Cannot create new Leave details");
     }
     parent::editAction($model);
 }
开发者ID:nyeholt,项目名称:relapse,代码行数:13,代码来源:LeaveController.php

示例2: editAction

 public function editAction()
 {
     if (Zend_Auth::getInstance()->getIdentity()->role != 'admin') {
         $this->_forms['edit']->removeElement('path');
     }
     $id = $this->_request->getParam('id');
     $page = $this->_modelMapper->find($id, new Pages_Model_Pages());
     if (is_null($page)) {
         $this->_redirector->gotoSimpleAndExit('index');
     }
     if ($this->_request->getParam('dataPage')) {
         $dataPage = $this->_request->getParam('dataPage');
         $page->setOptions($dataPage);
         $this->setUploadImage($page);
         $markdown = $dataPage['contentMarkdown'];
         $context_html = Michelf\MarkdownExtra::defaultTransform($markdown);
         $page->setContentHtml($context_html);
         $this->_modelMapper->save($page);
         $this->_redirector->gotoUrlAndExit($this->_request->getParam('currentUrl'));
     }
     parent::editAction();
     $config = array(Zend_Navigation_Page_Mvc::factory(array('label' => 'На сайт', 'uri' => $page->getPath() != 'home' ? '/' . $page->getPath() . '/' : '/')));
     $containerNav = new Zend_Navigation($config);
     $this->view->container_nav = $containerNav;
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:25,代码来源:PagesController.php

示例3: editAction

 public function editAction()
 {
     if ($this->_request->getParam('dataPage')) {
         $dataPage = $this->_request->getParam('dataPage');
         $id = $this->_request->getParam('id');
         $item = $this->_modelMapper->find($id, $this->_model);
         $item->setOptions($dataPage);
         $category = $this->_modelCategoriesMapper->find($item->getCategoryId(), new Pipeline_Model_PipelineCategories());
         $fullPath = $category ? $category->getPath() . '/' . $item->getPath() : $item->getPath();
         $item->setFullPath($fullPath);
         $this->setUploadImage($item);
         $markdown = $dataPage['contentMarkdown'];
         $context_html = Michelf\MarkdownExtra::defaultTransform($markdown);
         $item->setContentHtml($context_html);
         $this->_modelMapper->save($item);
         $this->_redirector->gotoUrlAndExit('/pipeline/' . $item->getFullPath());
     }
     parent::editAction();
     $form = $this->_forms['edit'];
     $imageTableElement = $form->getElement('imageTable');
     $imageTablePrepend = '<button type="button" class="btn btn-default" id="imageTableLoadBtn"><span class="glyphicon glyphicon-save"></span></button>';
     $imageTableValue = $imageTableElement->getValue();
     if (!is_null($imageTableValue)) {
         $imageTablePrepend .= '<a href="' . $imageTableValue . '" class="btn btn-default" target="_blank"><span class="glyphicon glyphicon-eye-open"></span></a>';
         //$imageTablePrepend .= '<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-trash"></span></button>';
     }
     $imageTableElement->setAttrib('prepend_btn', $imageTablePrepend);
     $this->setViewPipelineProperties();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:29,代码来源:PipelineController.php

示例4: editAction

 public function editAction()
 {
     if ($this->_request->getParam('dataPage')) {
         $dataPage = $this->_request->getParam('dataPage');
         $id = $this->_request->getParam('id');
         $categories = $this->_modelMapper->find($id, $this->_model);
         $categories->setOptions($dataPage);
         $this->setUploadImage($categories);
         $this->_modelMapper->save($categories);
         $this->getRedirector()->gotoUrlAndExit('/media/' . $categories->getPath());
     }
     parent::editAction();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:13,代码来源:MediaCategoriesController.php

示例5: editAction

 public function editAction()
 {
     if ($this->_request->getParam('dataPage')) {
         $dataPage = $this->_request->getParam('dataPage');
         $id = $this->_request->getParam('id');
         $categories = $this->_modelMapper->find($id, $this->_model);
         $categories->setOptions($dataPage);
         $this->setUploadImage($categories);
         $markdown = $dataPage['contentMarkdown'];
         $context_html = Michelf\MarkdownExtra::defaultTransform($markdown);
         $categories->setContentHtml($context_html);
         $this->_modelMapper->save($categories);
         $this->_redirector->gotoUrlAndExit('/manufacture/' . $categories->getPath());
     }
     parent::editAction();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:16,代码来源:ManufactureCategoriesController.php

示例6: editAction

 public function editAction()
 {
     if ($this->_request->getParam('dataPage')) {
         $dataPage = $this->_request->getParam('dataPage');
         $id = $this->_request->getParam('id');
         $item = $this->_modelMapper->find($id, $this->_model);
         $item->setOptions($dataPage);
         $categories = $this->_modelCategoriesMapper->find($item->getCategoryId(), new Media_Model_MediaCategories());
         $fullPath = $categories->getPath() . '/' . $item->getPath();
         $item->setFullPath($fullPath);
         $this->setUploadImage($item);
         $markdown = $dataPage['contentMarkdown'];
         $context_html = Michelf\MarkdownExtra::defaultTransform($markdown);
         $item->setContentHtml($context_html);
         $this->_modelMapper->save($item);
         $this->_redirector->gotoUrlAndExit('/media/' . $item->getFullPath());
     }
     parent::editAction();
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:19,代码来源:MediaController.php

示例7: editAction

 public function editAction($model = null)
 {
     $this->view->project = $this->projectService->getProject((int) $this->_getParam('projectid'));
     $this->view->timesheets = $this->projectService->getTimesheets(array('projectid=' => $this->view->project->id));
     parent::editAction($model);
 }
开发者ID:nyeholt,项目名称:relapse,代码行数:6,代码来源:InvoiceController.php


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