input; // access the global operators object $oper_obj = VikBooking::getOperatorInstance(); // get tool data $tool_data = $oper_obj->getToolData($this->tool); if (!$tool_data) { // tool is unknown VBOHttpDocument::getInstance()->close(404, sprintf('Operator tool not found (%s)', $this->tool)); } if (!$oper_obj->checkPermissions($this->operator, $this->tool)) { // no permission to access this tool VBOHttpDocument::getInstance()->close(403, sprintf('Not enough permissions to access the tool (%s)', $this->tool)); } /** * Wrap operator tool permissions into a registry. * NOTICE: checkPermissions() called above will modify * by reference the "perms" key on the operator array record. */ $permissions = new JObject(($this->operator['perms'] ?: [])); // build URI to current tool $tool_uri = JRoute::rewrite( sprintf( 'index.php?option=com_vikbooking&view=operators&tool=%s&Itemid=%d', $this->tool, JFactory::getApplication()->input->getInt('Itemid', 0) ) ); // tool icon $tool_icon = ($tool_data['icon'] ?? '') ?: ''; ?>
getToolName($this->tool); ?>
tool, $this->operator, $permissions, $tool_uri); } else { // render the tool by dispatching the dedicated event/hook VBOFactory::getPlatform()->getDispatcher()->trigger('onRenderOperatorTool' . ucfirst($this->tool), [$this->tool, $this->operator, $permissions, $tool_uri]); } ?>