original_string: public function findComponentByName($name)
      {
          if (isset($this->page->components[$name])) {
              return $this->page->components[$name];
          }
  
          if (isset($this->layout->components[$name])) {
              return $this->layout->components[$name];
          }
  
          $partialComponent = $this->partialStack->getComponent($name);
          if ($partialComponent !== null) {
              return $partialComponent;
          }
  
          return null;
      }
code: public function findComponentByName($name)
      {
          if (isset($this->page->components[$name])) {
              return $this->page->components[$name];
          }
  
          if (isset($this->layout->components[$name])) {
              return $this->layout->components[$name];
          }
  
          $partialComponent = $this->partialStack->getComponent($name);
          if ($partialComponent !== null) {
              return $partialComponent;
          }
  
          return null;
      }
code_tokens: public function findComponentByName ( $ name ) { if ( isset ( $ this -> page -> components [ $ name ] ) ) { return $ this -> page -> components [ $ name ] ; } if ( isset ( $ this -> layout -> components [ $ name ] ) ) { return $ this -> layout -> components [ $ name ] ; } $ partialComponent = $ this -> partialStack -> getComponent ( $ name ) ; if ( $ partialComponent !== null ) { return $ partialComponent ; } return null ; }
docstring: Searches the layout and page components by an alias
  @param $name
  @return ComponentBase The component object, if found
docstring_tokens: Searches the layout and page components by an alias