code/view/json.php
protected function _callCustomMethod(ModelEntityInterface $entity, $method)
    {
        $result = false;
        $name   = StringInflector::singularize($entity->getIdentifier()->name);
        $method = '_get'.ucfirst($name).ucfirst($method);

        if ($method !== '_getEntity'.ucfirst($method) && method_exists($this, $method)) {
            $result = $this->$method($entity);
        }

        return $result;
    }
protected function _callCustomMethod(ModelEntityInterface $entity, $method)
    {
        $result = false;
        $name   = StringInflector::singularize($entity->getIdentifier()->name);
        $method = '_get'.ucfirst($name).ucfirst($method);

        if ($method !== '_getEntity'.ucfirst($method) && method_exists($this, $method)) {
            $result = $this->$method($entity);
        }

        return $result;
    }
protected function _callCustomMethod ( ModelEntityInterface $ entity , $ method ) { $ result = false ; $ name = StringInflector :: singularize ( $ entity -> getIdentifier ( ) -> name ) ; $ method = '_get' . ucfirst ( $ name ) . ucfirst ( $ method ) ; if ( $ method !== '_getEntity' . ucfirst ( $ method ) && method_exists ( $ this , $ method ) ) { $ result = $ this -> $ method ( $ entity ) ; } return $ result ; }
Calls a custom method per entity name to modify resource objects

If the entity is of type foo and the method is links, this method will return the results of
_getFooLinks method if possible

@param ModelEntityInterface $entity
@param string $method
@return mixed Method results or false if the method not exists
Calls a custom method per entity name to modify resource objects