Example #1
0
 /**
  * @return string
  */
 public function render()
 {
     $attributes = '';
     foreach ($this->attributes->getAll() as $type => $values) {
         $attributes .= $this->renderField($type, $this->renderAttributeValues($values));
     }
     return $attributes;
 }
 /**
  * @param string $classes
  * @return ElementContainer
  */
 public function addCssClasses($classes)
 {
     /** @var AbstractElement[] $elementsIterator */
     $elementsIterator = $this->elements->getAll();
     foreach ($elementsIterator as $elements) {
         $elements->addCssClasses($classes);
     }
     return $this;
 }
Example #3
0
 /**
  * @return array
  */
 public function getControllerDirectories()
 {
     return $this->controllerDirectories->getAll();
 }
Example #4
0
 /**
  * Data with the same key will be overridden
  *
  * @param array $data
  */
 public function addData(array $data)
 {
     $this->data->setData($data);
 }
Example #5
0
 public function testGetStoreSetValue()
 {
     $config = new Store();
     $config->set('test', 'foo');
     $this->assertSame('foo', $config->get('test'));
 }
Example #6
0
 /**
  * @return string
  */
 public static function getLocale()
 {
     return static::$store->get('locale');
 }
Example #7
0
 /**
  * @param string $key
  * @param string $value
  *
  * @return Response
  */
 public function setHeader($key, $value)
 {
     $this->headers->set($key, $value);
     return $this;
 }
Example #8
-1
 /**
  * @return AbstractHtmlElement
  *
  * @throws NotExistsException
  */
 private function getSubmitElement()
 {
     $elementsIterator = $this->elements->getAll();
     foreach ($elementsIterator as $element) {
         if (ClassHelper::extractClass(get_class($element)) === 'SubmitElement') {
             return $element;
         }
     }
     throw new NotExistsException('The form "' . $this->attributes->get('id') . '" has no submit element.');
 }
Example #9
-1
 /**
  * @return Store
  */
 public function getConfig()
 {
     $store = new Store(require ROOT . '/config/public.php');
     $store->setData(require ROOT . '/config/private.php');
     return $store;
 }