Zepi/Web/UserInterface/src/Layout/AbstractContainer.php
public function getChildrenByType($type, $recursive = true)
    {
        $results = array();

        foreach ($this->parts as $part) {
            if (is_a($part, $type) || is_subclass_of($part, $type)) {
                $results[] = $part;
            }
            
            if ($recursive) {
                $results = array_merge($results, $part->getChildrenByType($type, $recursive));
            }
        }

        return $results;
    }
public function getChildrenByType($type, $recursive = true)
    {
        $results = array();

        foreach ($this->parts as $part) {
            if (is_a($part, $type) || is_subclass_of($part, $type)) {
                $results[] = $part;
            }
            
            if ($recursive) {
                $results = array_merge($results, $part->getChildrenByType($type, $recursive));
            }
        }

        return $results;
    }
public function getChildrenByType ( $ type , $ recursive = true ) { $ results = array ( ) ; foreach ( $ this -> parts as $ part ) { if ( is_a ( $ part , $ type ) || is_subclass_of ( $ part , $ type ) ) { $ results [ ] = $ part ; } if ( $ recursive ) { $ results = array_merge ( $ results , $ part -> getChildrenByType ( $ type , $ recursive ) ) ; } } return $ results ; }
Returns all children with the given type.

@access public
@param string $type
@param boolean $recursive
@return array
Returns all children with the given type .