Ejemplo n.º 1
0
 /**
  * Size of input
  * @param string $size
  * @return \sersid\smartadmin\ActiveField
  */
 public function size($size)
 {
     Html::addCssClass($this->inputOptions, $size);
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Set no padding
  */
 private function _setNoPadding()
 {
     if ($this->noPadding !== null) {
         Html::addCssClass($this->bodyOptions, 'no-padding');
     }
 }
Ejemplo n.º 3
0
 /**
  * Check to see if a child item is active optionally activating the parent.
  * @param array $items @see items
  * @param boolean $active should the parent be active too
  * @return array @see items
  */
 protected function isChildActive($items, &$active)
 {
     foreach ($items as $i => $child) {
         if (ArrayHelper::remove($items[$i], 'active', false) || $this->isItemActive($child)) {
             Html::addCssClass($items[$i]['options'], 'active');
             if ($this->activateParents) {
                 $active = true;
             }
         }
     }
     return $items;
 }