示例#1
0
 /**
  * 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());
 }