original_string: public function createRelationLink($alias, $relation, $options = [])
      {
          return $this->Html->link(
              __d('crud', 'Add {0}', [Inflector::singularize(Inflector::humanize(Inflector::underscore($alias)))]),
              [
                  'plugin' => $relation['plugin'],
                  'controller' => $relation['controller'],
                  'action' => 'add',
                  '?' => [
                      $relation['foreignKey'] => $this->getViewVar('primaryKeyValue'),
                      '_redirect_url' => $this->getView()->getRequest()->getUri()->getPath()
                  ]
              ],
              $options
          );
      }
code: public function createRelationLink($alias, $relation, $options = [])
      {
          return $this->Html->link(
              __d('crud', 'Add {0}', [Inflector::singularize(Inflector::humanize(Inflector::underscore($alias)))]),
              [
                  'plugin' => $relation['plugin'],
                  'controller' => $relation['controller'],
                  'action' => 'add',
                  '?' => [
                      $relation['foreignKey'] => $this->getViewVar('primaryKeyValue'),
                      '_redirect_url' => $this->getView()->getRequest()->getUri()->getPath()
                  ]
              ],
              $options
          );
      }
code_tokens: public function createRelationLink ( $ alias , $ relation , $ options = [ ] ) { return $ this -> Html -> link ( __d ( 'crud' , 'Add {0}' , [ Inflector :: singularize ( Inflector :: humanize ( Inflector :: underscore ( $ alias ) ) ) ] ) , [ 'plugin' => $ relation [ 'plugin' ] , 'controller' => $ relation [ 'controller' ] , 'action' => 'add' , '?' => [ $ relation [ 'foreignKey' ] => $ this -> getViewVar ( 'primaryKeyValue' ) , '_redirect_url' => $ this -> getView ( ) -> getRequest ( ) -> getUri ( ) -> getPath ( ) ] ] , $ options ) ; }
docstring: Create relation link.
  
  @param string $alias Model alias.
  @param array $relation Relation information.
  @param array $options Options array to be passed to the link function
  @return string
docstring_tokens: Create relation link .