src/Model/Comment.php
public function ReplyForm()
    {
        // Ensure replies are enabled
        if (!$this->getRepliesEnabled()) {
            return null;
        }

        // Check parent is available
        $parent = $this->Parent();
        if (!$parent || !$parent->exists()) {
            return null;
        }

        // Build reply controller
        $controller = CommentingController::create();
        $controller->setOwnerRecord($parent);
        $controller->setParentClass($parent->ClassName);
        $controller->setOwnerController(Controller::curr());

        return $controller->ReplyForm($this);
    }
public function ReplyForm()
    {
        // Ensure replies are enabled
        if (!$this->getRepliesEnabled()) {
            return null;
        }

        // Check parent is available
        $parent = $this->Parent();
        if (!$parent || !$parent->exists()) {
            return null;
        }

        // Build reply controller
        $controller = CommentingController::create();
        $controller->setOwnerRecord($parent);
        $controller->setParentClass($parent->ClassName);
        $controller->setOwnerController(Controller::curr());

        return $controller->ReplyForm($this);
    }
public function ReplyForm ( ) { // Ensure replies are enabled if ( ! $ this -> getRepliesEnabled ( ) ) { return null ; } // Check parent is available $ parent = $ this -> Parent ( ) ; if ( ! $ parent || ! $ parent -> exists ( ) ) { return null ; } // Build reply controller $ controller = CommentingController :: create ( ) ; $ controller -> setOwnerRecord ( $ parent ) ; $ controller -> setParentClass ( $ parent -> ClassName ) ; $ controller -> setOwnerController ( Controller :: curr ( ) ) ; return $ controller -> ReplyForm ( $ this ) ; }
Generate a reply form for this comment

@return Form
Generate a reply form for this comment