original_string: public function addSideMenuItem($owner, $code, $sideCode, array $definition)
      {
          $itemKey = $this->makeItemKey($owner, $code);
  
          if (!isset($this->items[$itemKey])) {
              return false;
          }
  
          $mainItem = $this->items[$itemKey];
  
          $definition = array_merge($definition, [
              'code'  => $sideCode,
              'owner' => $owner
          ]);
  
          if (isset($mainItem->sideMenu[$sideCode])) {
              $definition = array_merge((array) $mainItem->sideMenu[$sideCode], $definition);
          }
  
          $item = (object) array_merge(self::$sideItemDefaults, $definition);
  
          $this->items[$itemKey]->sideMenu[$sideCode] = $item;
      }
code: public function addSideMenuItem($owner, $code, $sideCode, array $definition)
      {
          $itemKey = $this->makeItemKey($owner, $code);
  
          if (!isset($this->items[$itemKey])) {
              return false;
          }
  
          $mainItem = $this->items[$itemKey];
  
          $definition = array_merge($definition, [
              'code'  => $sideCode,
              'owner' => $owner
          ]);
  
          if (isset($mainItem->sideMenu[$sideCode])) {
              $definition = array_merge((array) $mainItem->sideMenu[$sideCode], $definition);
          }
  
          $item = (object) array_merge(self::$sideItemDefaults, $definition);
  
          $this->items[$itemKey]->sideMenu[$sideCode] = $item;
      }
code_tokens: public function addSideMenuItem ( $ owner , $ code , $ sideCode , array $ definition ) { $ itemKey = $ this -> makeItemKey ( $ owner , $ code ) ; if ( ! isset ( $ this -> items [ $ itemKey ] ) ) { return false ; } $ mainItem = $ this -> items [ $ itemKey ] ; $ definition = array_merge ( $ definition , [ 'code' => $ sideCode , 'owner' => $ owner ] ) ; if ( isset ( $ mainItem -> sideMenu [ $ sideCode ] ) ) { $ definition = array_merge ( ( array ) $ mainItem -> sideMenu [ $ sideCode ] , $ definition ) ; } $ item = ( object ) array_merge ( self :: $ sideItemDefaults , $ definition ) ; $ this -> items [ $ itemKey ] -> sideMenu [ $ sideCode ] = $ item ; }
docstring: Dynamically add a single side menu item
  @param string $owner
  @param string $code
  @param string $sideCode
  @param array  $definitions
docstring_tokens: Dynamically add a single side menu item