public function find($id) { $user = parent::find($id); // Add Gravatar $gravatarSize = 80; $user->gravatar = $this->getGravatar($user->email, $gravatarSize); return $user; }
/** * Returns the comment with the specified id. * This is an "adapter" for the class in the parent, since * the CommentController class expects an array and not an object. * The model object is still populated with the values from * the database, since this is done in the parent method. * * @return comment as array */ public function find($commentId = null) { return parent::find($commentId)->getProperties(); }