Esempio n. 1
0
 public function createStockPage($name)
 {
     /* @var $inflector \Dewdrop\Inflector */
     $inflector = Pimple::getResource('inflector');
     $className = '\\Dewdrop\\Admin\\Page\\Stock\\' . $inflector->camelize($name);
     /* @var $page PageAbstract */
     $page = new $className($this->component, $this->request, __DIR__ . '/Stock/view-scripts');
     $page->getView()->assignInstance('headlink', $this->view->headLink())->assignInstance('headscript', $this->view->headScript());
     return $page;
 }
Esempio n. 2
0
 /**
  * Render the submit button for this action.
  *
  * @param View $view
  * @return string
  */
 public function render(View $view)
 {
     foreach ($this->stylesheets as $stylesheet) {
         $view->headLink()->appendStylesheet($stylesheet);
     }
     foreach ($this->scriptFiles as $file) {
         $view->headScript()->appendFile($file);
     }
     return sprintf('<input id="%s" name="%s" type="submit" class="%s" value="%s" />', $view->escapeHtmlAttr($this->id), $view->escapeHtmlAttr($this->id), $view->escapeHtmlAttr($this->buttonClassName), $view->escapeHtmlAttr($this->buttonTitle));
 }
Esempio n. 3
0
 /**
  * @return void
  */
 public function testGetHeadscriptFromView()
 {
     $headScript = $this->view->headScript();
     $this->assertInstanceOf('\\Zend\\View\\Helper\\HeadScript', $headScript);
 }