コード例 #1
0
ファイル: Fieldset.php プロジェクト: emados/Momtaz-Framework
 /**
  * Set/change the priority of an element
  *
  * @return Fieldset
  * @throws \Nmwdhj\Exception
  * @since 1.3
  */
 public function set_priority($key, $priority)
 {
     if (!$this->has($key)) {
         throw new Exception('No element with the given name is found');
     }
     $this->elements->offsetSet($key, $this->elements[$key], $priority);
     return $this;
 }
コード例 #2
0
ファイル: BoxCollection.php プロジェクト: watoki/boxes
 private function wrap($name, $model, WebRequest $dispatched, WebRequest $wrapped)
 {
     $wrapper = new Wrapper($name, $dispatched->getTarget(), $wrapped->getArguments());
     if ($this->isMapping()) {
         $wrapper->except($this->mappedBox);
     }
     $model = $wrapper->wrap($model);
     $this->onLoadHandler .= $wrapper->getOnLoadHandler();
     $this->heads->putAll($wrapper->getHeadElements());
     return $model;
 }
コード例 #3
0
ファイル: Document.php プロジェクト: slavomirkuzma/itc-bundle
 /**
  * Gets SK ITC Bundle DTD Document Element
  *
  * @param string $name
  *        	SK ITC Bundle DTD Document Element Name
  * @return \SK\ITCBundle\ORM\DTD\Element[]
  */
 public function getElement($name = null)
 {
     if (NULL === $this->element) {
         $this->element = new \ArrayIterator();
     }
     if (NULL !== $name) {
         if (!$this->getElement()->offsetExists($name)) {
             $source = $this->getSource()->getElement($name);
             $element = new Element($this, $name, $source);
             $this->setElement($element);
         }
         return $this->element->offsetGet($name);
     } else {
         foreach ($this->getSource()->getElement() as $name => $source) {
             $element = new Element($this, $name, $source);
             $this->setElement($element);
         }
     }
     return $this->element;
 }
コード例 #4
0
ファイル: Form.php プロジェクト: GerDner/luck-docker
 /**
  * @return bool
  */
 public function hasElements()
 {
     return $this->elements->count() > 0;
 }