TicketFollowup::canCreateItem PHP Method

canCreateItem() public method

Is the current user have right to create the current followup ?
public canCreateItem ( ) : boolean
return boolean
    function canCreateItem()
    {
        $ticket = new Ticket();
        if (!$ticket->can($this->getField('tickets_id'), READ) || in_array($ticket->fields['status'], $ticket->getClosedStatusArray()) && !$ticket->isAllowedStatus($ticket->fields['status'], Ticket::INCOMING)) {
            return false;
        }
        return $ticket->canAddFollowups();
    }