src/Form/Container.php
public function enableForm($key = null)
    {
        if (null === $key) {
            $this->activeForms = array_keys($this->forms);
            return $this;
        }
        
        if (!is_array($key)) {
            $key = array($key);
        }
        
        foreach ($key as $k) {
            if (false !== strpos($k, '.')) {
                // this seems not to be childkey.childform but actualkey.childkey
                list($childKey, $childForm) = explode('.', $k, 2);
                $child = $this->getForm($childKey);
                $child->enableForm($childForm);
            } else {
                if (isset($this->forms[$k]) && !in_array($k, $this->activeForms)) {
                    $this->activeForms[] = $k;
                }
            }
        }
        
        return $this;
    }
public function enableForm($key = null)
    {
        if (null === $key) {
            $this->activeForms = array_keys($this->forms);
            return $this;
        }
        
        if (!is_array($key)) {
            $key = array($key);
        }
        
        foreach ($key as $k) {
            if (false !== strpos($k, '.')) {
                // this seems not to be childkey.childform but actualkey.childkey
                list($childKey, $childForm) = explode('.', $k, 2);
                $child = $this->getForm($childKey);
                $child->enableForm($childForm);
            } else {
                if (isset($this->forms[$k]) && !in_array($k, $this->activeForms)) {
                    $this->activeForms[] = $k;
                }
            }
        }
        
        return $this;
    }
public function enableForm ( $ key = null ) { if ( null === $ key ) { $ this -> activeForms = array_keys ( $ this -> forms ) ; return $ this ; } if ( ! is_array ( $ key ) ) { $ key = array ( $ key ) ; } foreach ( $ key as $ k ) { if ( false !== strpos ( $ k , '.' ) ) { // this seems not to be childkey.childform but actualkey.childkey list ( $ childKey , $ childForm ) = explode ( '.' , $ k , 2 ) ; $ child = $ this -> getForm ( $ childKey ) ; $ child -> enableForm ( $ childForm ) ; } else { if ( isset ( $ this -> forms [ $ k ] ) && ! in_array ( $ k , $ this -> activeForms ) ) { $ this -> activeForms [ ] = $ k ; } } } return $ this ; }
Enables a formular.

Enabled formulars are included in the {@link getIterator()}

Traverses in child containers through .dot-Notation.

@param string $key
@return \Core\Form\Container
Enables a formular .