original_string: public function addSettingItem($owner, $code, array $definition)
      {
          $itemKey = $this->makeItemKey($owner, $code);
  
          if (isset($this->items[$itemKey])) {
              $definition = array_merge((array) $this->items[$itemKey], $definition);
          }
  
          $item = array_merge(self::$itemDefaults, array_merge($definition, [
              'code' => $code,
              'owner' => $owner
          ]));
  
          /*
           * Link to the generic settings page if a URL is not provided
           */
          if (isset($item['class']) && !isset($item['url'])) {
              $uri = [];
  
              if (strpos($owner, '.') !== null) {
                  list($author, $plugin) = explode('.', $owner);
                  $uri[] = strtolower($author);
                  $uri[] = strtolower($plugin);
              }
              else {
                  $uri[] = strtolower($owner);
              }
  
              $uri[] = strtolower($code);
              $uri =  implode('/', $uri);
              $item['url'] = Backend::url('system/settings/update/' . $uri);
          }
  
          $this->items[$itemKey] = (object) $item;
      }
code: public function addSettingItem($owner, $code, array $definition)
      {
          $itemKey = $this->makeItemKey($owner, $code);
  
          if (isset($this->items[$itemKey])) {
              $definition = array_merge((array) $this->items[$itemKey], $definition);
          }
  
          $item = array_merge(self::$itemDefaults, array_merge($definition, [
              'code' => $code,
              'owner' => $owner
          ]));
  
          /*
           * Link to the generic settings page if a URL is not provided
           */
          if (isset($item['class']) && !isset($item['url'])) {
              $uri = [];
  
              if (strpos($owner, '.') !== null) {
                  list($author, $plugin) = explode('.', $owner);
                  $uri[] = strtolower($author);
                  $uri[] = strtolower($plugin);
              }
              else {
                  $uri[] = strtolower($owner);
              }
  
              $uri[] = strtolower($code);
              $uri =  implode('/', $uri);
              $item['url'] = Backend::url('system/settings/update/' . $uri);
          }
  
          $this->items[$itemKey] = (object) $item;
      }
code_tokens: public function addSettingItem ( $ owner , $ code , array $ definition ) { $ itemKey = $ this -> makeItemKey ( $ owner , $ code ) ; if ( isset ( $ this -> items [ $ itemKey ] ) ) { $ definition = array_merge ( ( array ) $ this -> items [ $ itemKey ] , $ definition ) ; } $ item = array_merge ( self :: $ itemDefaults , array_merge ( $ definition , [ 'code' => $ code , 'owner' => $ owner ] ) ) ; /*
           * Link to the generic settings page if a URL is not provided
           */ if ( isset ( $ item [ 'class' ] ) && ! isset ( $ item [ 'url' ] ) ) { $ uri = [ ] ; if ( strpos ( $ owner , '.' ) !== null ) { list ( $ author , $ plugin ) = explode ( '.' , $ owner ) ; $ uri [ ] = strtolower ( $ author ) ; $ uri [ ] = strtolower ( $ plugin ) ; } else { $ uri [ ] = strtolower ( $ owner ) ; } $ uri [ ] = strtolower ( $ code ) ; $ uri = implode ( '/' , $ uri ) ; $ item [ 'url' ] = Backend :: url ( 'system/settings/update/' . $ uri ) ; } $ this -> items [ $ itemKey ] = ( object ) $ item ; }
docstring: Dynamically add a single setting item
  @param string $owner
  @param string $code
  @param array  $definitions
docstring_tokens: Dynamically add a single setting item