original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Searches the layout and page components by a partial file
  @param string $partial
  @return ComponentBase The component object, if found
docstring_tokens: Searches the layout and page components by a partial file