本文整理汇总了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);
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}