Files
crm.clientright.ru/modules/Workflow2/lib/Workflow/AssistentBase.php

38 lines
891 B
PHP
Raw Normal View History

<?php
namespace Workflow;
abstract class AssistentBase
{
protected $Name = 'Unnamed Assistent';
protected $Description = '';
private $_Key = '';
public function __construct($key) {
$this->_Key = $key;
}
public function getName() {
return $this->Name;
}
public function getDescription() {
return $this->Description;
}
final function showConfiguration() {
$viewer = \Vtiger_Viewer::getInstance();
$this->_beforeShowConfiguration($viewer);
$viewer->fetch(MODULE_ROOTPATH . DS . 'extends' . DS . 'assistent' . DS . $this->_Key . DS . 'configuration.tpl');
}
protected function _beforeShowConfiguration(\Vtiger_Viewer $viewer) {
// Implement your custom functions before show Configuration
}
public function execute($configuration) {
// Execute the Assistant
}
}