December 2015
Intermediate to advanced
412 pages
8h 14m
English
With InstallSchema in place, we now have conditions for entity persistence. Our next step is to define model, resource, and collection classes for the Ticket entity.
The Ticket entity model class is defined under the app/code/Foggyline/Helpdesk/Model/Ticket.php file with content as follows:
<?php namespace Foggyline\Helpdesk\Model; class Ticket extends \Magento\Framework\Model\AbstractModel { const STATUS_OPENED = 1; const STATUS_CLOSED = 2; const SEVERITY_LOW = 1; const SEVERITY_MEDIUM = 2; const SEVERITY_HIGH = 3; protected static $statusesOptions = [ self::STATUS_OPENED => 'Opened', self::STATUS_CLOSED => 'Closed', ]; protected static $severitiesOptions = [ self::SEVERITY_LOW => 'Low', ...Read now
Unlock full access