Beispiel #1
0
 /**
  * @issue ZF-5435
  */
 public function testContainerMaintainsCorrectOrderOfItems()
 {
     $this->helper->__invoke()->offsetSetStylesheet(1, '/test1.css');
     $this->helper->__invoke()->offsetSetStylesheet(10, '/test2.css');
     $this->helper->__invoke()->offsetSetStylesheet(20, '/test3.css');
     $this->helper->__invoke()->offsetSetStylesheet(5, '/test4.css');
     $test = $this->helper->toString();
     $expected = '<link href="/test1.css" media="screen" rel="stylesheet" type="text/css">' . PHP_EOL . '<link href="/test4.css" media="screen" rel="stylesheet" type="text/css">' . PHP_EOL . '<link href="/test2.css" media="screen" rel="stylesheet" type="text/css">' . PHP_EOL . '<link href="/test3.css" media="screen" rel="stylesheet" type="text/css">';
     $this->assertEquals($expected, $test);
 }
Beispiel #2
0
 public function __invoke(array $attributes = null, $placement = Placeholder\Container\AbstractContainer::APPEND)
 {
     return parent::__invoke($attributes, $placement);
 }
Beispiel #3
0
 /**
  * headLink() - View Helper Method
  *
  * Returns current object instance. Optionally, allows passing array of
  * values to build link.
  *
  * @param  array  $attributes
  * @param  string $placement
  *
  * @return HeadLink
  */
 public function __invoke(array $attributes = null, $placement = AbstractContainer::APPEND)
 {
     $this->setRcmDefaultLink();
     return parent::__invoke($attributes, $placement);
 }
Beispiel #4
0
 /**
  * {@inheritDoc}
  * @return self
  */
 public function __invoke(array $attributes = null, $placement = Placeholder\Container\AbstractContainer::APPEND)
 {
     parent::__invoke($attributes, strtoupper($placement));
     return $this;
 }