public function findComponentByPartial($partial)
    {
        foreach ($this->page->components as $component) {
            if (ComponentPartial::check($component, $partial)) {
                return $component;
            }
        }

        foreach ($this->layout->components as $component) {
            if (ComponentPartial::check($component, $partial)) {
                return $component;
            }
        }

        return null;
    }
public function findComponentByPartial($partial)
    {
        foreach ($this->page->components as $component) {
            if (ComponentPartial::check($component, $partial)) {
                return $component;
            }
        }

        foreach ($this->layout->components as $component) {
            if (ComponentPartial::check($component, $partial)) {
                return $component;
            }
        }

        return null;
    }
public function findComponentByPartial ( $ partial ) { foreach ( $ this -> page -> components as $ component ) { if ( ComponentPartial :: check ( $ component , $ partial ) ) { return $ component ; } } foreach ( $ this -> layout -> components as $ component ) { if ( ComponentPartial :: check ( $ component , $ partial ) ) { return $ component ; } } return null ; }
Searches the layout and page components by a partial file
@param string $partial
@return ComponentBase The component object, if found
Searches the layout and page components by a partial file