Beispiel #1
0
 public function testResetCss()
 {
     $this->assertTrue(count($this->assets->js()) == 0);
     $this->assets->addInlineCss('body { color: black }');
     $this->assets->resetCss();
     $this->assertTrue(count($this->assets->css()) == 0);
     $this->assets->add('/system/assets/debugger.css', null, true);
     $this->assets->resetCss();
     $this->assertTrue(count($this->assets->css()) == 0);
 }
 /**
  * Add plugin specific assets
  * @param Page $page
  * @param Assets $assets
  */
 protected function addAssets(Page $page, Assets $assets)
 {
     $pluginAssets = [];
     if (!empty($page->header()->videoembed['assets'])) {
         $pluginAssets = (array) $page->header()->videoembed['assets'];
     }
     foreach ($pluginAssets as $asset) {
         $assets->add($asset);
     }
 }