示例#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;
 }
示例#3
0
 /**
  * @return array
  */
 public function getControllerDirectories()
 {
     return $this->controllerDirectories->getAll();
 }
示例#4
0
 /**
  * Data with the same key will be overridden
  *
  * @param array $data
  */
 public function addData(array $data)
 {
     $this->data->setData($data);
 }
示例#5
0
 public function testGetStoreSetValue()
 {
     $config = new Store();
     $config->set('test', 'foo');
     $this->assertSame('foo', $config->get('test'));
 }
示例#6
0
 /**
  * @return string
  */
 public static function getLocale()
 {
     return static::$store->get('locale');
 }
示例#7
0
 /**
  * @param string $key
  * @param string $value
  *
  * @return Response
  */
 public function setHeader($key, $value)
 {
     $this->headers->set($key, $value);
     return $this;
 }
示例#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.');
 }
示例#9
-1
 /**
  * @return Store
  */
 public function getConfig()
 {
     $store = new Store(require ROOT . '/config/public.php');
     $store->setData(require ROOT . '/config/private.php');
     return $store;
 }