| Current Path : /var/www/consult-e-syn/public_html/administrator/components/com_ats/Model/ |
| Current File : /var/www/consult-e-syn/public_html/administrator/components/com_ats/Model/ManagerNotes.php |
<?php
/**
* @package ats
* @copyright Copyright (c)2011-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Akeeba\TicketSystem\Admin\Model;
defined('_JEXEC') or die;
use Akeeba\TicketSystem\Admin\Helper\Bbcode;
use FOF40\Container\Container;
/**
* @property int ats_managernote_id Primary key
* @property string note_html HTML content of the note
* @property string note Raw BBCode content of the note
* @property int ats_ticket_id Linked ticket
*
* @property-read Tickets ticket Linked ticket
*/
class ManagerNotes extends DefaultDataModel
{
public function __construct(Container $container, array $config = array())
{
parent::__construct($container, $config);
$this->belongsTo('ticket', 'Tickets', 'ats_ticket_id', 'ats_ticket_id');
}
public function check()
{
// Process the content
$content = htmlentities($this->note, ENT_NOQUOTES, 'UTF-8', false);
$content = str_replace('<', '<', $content);
$content = str_replace('>', '>', $content);
if(!empty($content))
{
$this->note_html = Bbcode::parseBBCode($content);
}
}
}