コード例 #1
0
 /**
  * Handle the command.
  *
  * @param EntryFormBuilder $builder
  */
 public function handle(EntryFormBuilder $builder)
 {
     $type = $this->post->getType();
     $builder->setModel($type->getEntryModelName());
     $builder->setEntry($this->post->getEntryId());
     $this->builder->addForm('entry', $builder);
 }
コード例 #2
0
ファイル: PostAssets.php プロジェクト: ramcda/posts-module
 /**
  * Add the page and page type assets.
  *
  * @param PostInterface $post
  * @throws \Exception
  */
 public function add(PostInterface $post)
 {
     /* @var EditorFieldTypePresenter $js */
     /* @var EditorFieldTypePresenter $css */
     $js = $post->getFieldTypePresenter('js');
     $css = $post->getFieldTypePresenter('css');
     $this->asset->add('styles.css', $css->path());
     $this->asset->add('scripts.js', $js->path());
     $type = $post->getType();
     $js = $type->getFieldTypePresenter('js');
     $css = $type->getFieldTypePresenter('css');
     $this->asset->add('styles.css', $css->path());
     $this->asset->add('scripts.js', $js->path());
 }