/**
  * doExecute
  *
  * @return  string
  */
 protected function doExecute()
 {
     $view = new SettingsHtmlView($this->data);
     $form = new Form('blog');
     $form->defineFormFields(new BlogDefinition());
     $form->bind($view['blog']);
     $view['form'] = $form;
     $view['item'] = $view['blog'];
     return $view->setLayout('edit')->render();
 }
 /**
  * doExecute
  *
  * @return  mixed
  */
 protected function doExecute()
 {
     $id = $this->input->get('id');
     $blog = $id ? (new DataMapper('blogs'))->findOne($id) : new Data();
     $blog->params = json_decode($blog->params);
     $view = new SettingsHtmlView($this->data);
     $form = new Form('blog');
     $form->defineFormFields(new BlogDefinition());
     $form->bind($blog);
     $view['form'] = $form;
     $view['item'] = $blog;
     return $view->setLayout('edit')->render();
 }