function plugin_pre_item_purge_moreticket($item) { switch (get_class($item)) { case 'Ticket': $temp = new PluginMoreticketWaitingTicket(); $temp->deleteByCriteria(array('tickets_id' => $item->getField('id'))); break; } }
/** * Display tab's content for each users * * @static * @param CommonGLPI $item * @param int $tabnum * @param int $withtemplate * @return bool|true */ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if (in_array($item->getType(), PluginMoreticketWaitingTicket::getTypes(true))) { self::showForTicket($item); } return true; }
Moreticket is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moreticket. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Session::checkLoginUser(); //Html::header_nocache(); if (!isset($_POST['tickets_id']) || empty($_POST['tickets_id'])) { $_POST['tickets_id'] = 0; } if (isset($_POST['action'])) { switch ($_POST['action']) { case 'showForm': header("Content-Type: text/html; charset=UTF-8"); // Ticket is waiting $waiting_ticket = new PluginMoreticketWaitingTicket(); $waiting_ticket->showForm($_POST['tickets_id']); // Ticket is closed if (isset($_POST['type']) && $_POST['type'] == 'add') { $close_ticket = new PluginMoreticketCloseTicket(); $close_ticket->showForm($_POST['tickets_id']); } break; } }
static function afterUpdate(Ticket $ticket) { PluginMoreticketWaitingTicket::postUpdateWaitingTicket($ticket); }