diff --git a/Admin/Activate.php b/Admin/Activate.php deleted file mode 100644 index b3fa30f..0000000 --- a/Admin/Activate.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Admin; - - -use phpOMS\DataStorage\Database\DatabasePool; -use phpOMS\Module\ActivateAbstract; -use phpOMS\Module\InfoManager; - -/** - * Navigation class. - * - * @category Modules - * @package Modules\Admin - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Activate extends ActivateAbstract -{ - - /** - * {@inheritdoc} - */ - public static function activate(DatabasePool $dbPool, InfoManager $info) - { - parent::activate($dbPool, $info); - } -} diff --git a/Admin/Deactivate.php b/Admin/Deactivate.php deleted file mode 100644 index d47cf80..0000000 --- a/Admin/Deactivate.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Admin; - - -use phpOMS\DataStorage\Database\DatabasePool; -use phpOMS\Module\DeactivateAbstract; -use phpOMS\Module\InfoManager; - -/** - * Navigation class. - * - * @category Modules - * @package Modules\Admin - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Deactivate extends DeactivateAbstract -{ - - /** - * {@inheritdoc} - */ - public static function deactivate(DatabasePool $dbPool, InfoManager $info) - { - parent::deactivate($dbPool, $info); - } -} diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json deleted file mode 100644 index 7bd6452..0000000 --- a/Admin/Install/Navigation.install.json +++ /dev/null @@ -1,63 +0,0 @@ -[ - { - "id": 1005501001, - "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", - "type": 2, - "subtype": 1, - "name": "Workflows", - "uri": "/{/lang}/backend/workflow/dashboard?{?}", - "target": "self", - "icon": null, - "order": 40, - "from": "Wokflow", - "permission": null, - "parent": 1003301001, - "children": [ - { - "id": 1005502001, - "pid": "ac3d9bdf783c7963f449488e33c60133b3dbe6f8", - "type": 3, - "subtype": 1, - "name": "Dashboard", - "uri": "/{/lang}/backend/workflow/dashboard?{?}", - "target": "self", - "icon": null, - "order": 1, - "from": "Wokflow", - "permission": null, - "parent": 1005501001, - "children": [] - }, - { - "id": 1005503001, - "pid": "ac3d9bdf783c7963f449488e33c60133b3dbe6f8", - "type": 3, - "subtype": 1, - "name": "Templates", - "uri": "/{/lang}/backend/workflow/template/list?{?}", - "target": "self", - "icon": null, - "order": 5, - "from": "Wokflow", - "permission": null, - "parent": 1005501001, - "children": [] - }, - { - "id": 1005504001, - "pid": "ac3d9bdf783c7963f449488e33c60133b3dbe6f8", - "type": 3, - "subtype": 1, - "name": "Create", - "uri": "/{/lang}/backend/workflow/template/create?{?}", - "target": "self", - "icon": null, - "order": 10, - "from": "Wokflow", - "permission": null, - "parent": 1005501001, - "children": [] - } - ] - } -] diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php deleted file mode 100644 index 9c337be..0000000 --- a/Admin/Install/Navigation.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Admin\Install; -use phpOMS\DataStorage\Database\DatabasePool; - -/** - * Navigation class. - * - * @category Modules - * @package Modules\Admin - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Navigation -{ - public static function install(string $path, DatabasePool $dbPool) - { - $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); - - $class = '\\Modules\\Navigation\\Admin\\Installer'; - /** @var $class \Modules\Navigation\Admin\Installer */ - $class::installExternal($dbPool, $navData); - } -} diff --git a/Admin/Installer.php b/Admin/Installer.php deleted file mode 100644 index a7a9ad6..0000000 --- a/Admin/Installer.php +++ /dev/null @@ -1,140 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Admin; - -use phpOMS\DataStorage\Database\DatabaseType; -use phpOMS\DataStorage\Database\DatabasePool; -use phpOMS\Module\InfoManager; -use phpOMS\Module\InstallerAbstract; - -/** - * Tasks install class. - * - * @category Modules - * @package Modules\Tasks - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Installer extends InstallerAbstract -{ - - /** - * {@inheritdoc} - */ - public static function install(string $path, DatabasePool $dbPool, InfoManager $info) - { - parent::install($path, $dbPool, $info); - - switch ($dbPool->get('core')->getType()) { - case DatabaseType::MYSQL: - $dbPool->get('core')->con->prepare( - 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'workflow` ( - `workflow_id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_name` varchar(50) NOT NULL, - `workflow_status` int(11) NOT NULL, - `workflow_desc` varchar(100) DEFAULT NULL, - `workflow_created` datetime DEFAULT NULL, - `workflow_created_by` int(11) DEFAULT NULL, - PRIMARY KEY (`workflow_id`), - KEY `workflow_created_by` (`workflow_created_by`) - )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'workflow` - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_ibfk_1` FOREIGN KEY (`workflow_created_by`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'workflow_media` ( - `workflow_media_id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_media_media` int(11) NOT NULL, - `workflow_media_workflow` int(11) NOT NULL, - `workflow_media_type` int(3) DEFAULT NULL, - PRIMARY KEY (`workflow_media_id`), - KEY `workflow_media_media` (`workflow_media_media`), - KEY `workflow_media_workflow` (`workflow_media_workflow`) - )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'workflow_media` - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_media_ibfk_1` FOREIGN KEY (`workflow_media_media`) REFERENCES `' . $dbPool->get('core')->prefix . 'media` (`media_id`), - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_media_ibfk_2` FOREIGN KEY (`workflow_media_workflow`) REFERENCES `' . $dbPool->get('core')->prefix . 'workflow` (`workflow_id`);' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'workflow_element` ( - `workflow_element_id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_element_name` varchar(50) NOT NULL, - `workflow_element_status` int(11) NOT NULL, - `workflow_element_data` text NOT NULL, - `workflow_element_desc` varchar(100) DEFAULT NULL, - `workflow_element_created` datetime DEFAULT NULL, - `workflow_element_created_by` int(11) DEFAULT NULL, - `workflow_element_workflow` int(11) DEFAULT NULL, - PRIMARY KEY (`workflow_element_id`), - KEY `workflow_element_created_by` (`workflow_element_created_by`), - KEY `workflow_element_workflow` (`workflow_element_workflow`) - )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'workflow_element` - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_element_ibfk_1` FOREIGN KEY (`workflow_element_created_by`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`), - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_element_ibfk_2` FOREIGN KEY (`workflow_element_workflow`) REFERENCES `' . $dbPool->get('core')->prefix . 'workflow` (`workflow_id`);' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'workflow_element_media` ( - `workflow_element_media_id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_element_media_media` int(11) NOT NULL, - `workflow_element_media_workflow_element` int(11) NOT NULL, - PRIMARY KEY (`workflow_element_media_id`), - KEY `workflow_element_media_media` (`workflow_element_media_media`), - KEY `workflow_element_media_workflow_element` (`workflow_element_media_workflow_element`) - )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'workflow_element_media` - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_element_media_ibfk_1` FOREIGN KEY (`workflow_element_media_media`) REFERENCES `' . $dbPool->get('core')->prefix . 'media` (`media_id`), - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_element_media_ibfk_2` FOREIGN KEY (`workflow_element_media_workflow_element`) REFERENCES `' . $dbPool->get('core')->prefix . 'workflow_element` (`workflow_element_id`);' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'workflow_element_task` ( - `workflow_element_task_id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_element_task_task` int(11) NOT NULL, - `workflow_element_task_workflow_element` int(11) NOT NULL, - PRIMARY KEY (`workflow_element_task_id`), - KEY `workflow_element_task_task` (`workflow_element_task_task`), - KEY `workflow_element_task_workflow_element` (`workflow_element_task_workflow_element`) - )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' - )->execute(); - - $dbPool->get('core')->con->prepare( - 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'workflow_element_task` - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_element_task_ibfk_1` FOREIGN KEY (`workflow_element_task_task`) REFERENCES `' . $dbPool->get('core')->prefix . 'task` (`media_id`), - ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'workflow_element_task_ibfk_2` FOREIGN KEY (`workflow_element_task_workflow_element`) REFERENCES `' . $dbPool->get('core')->prefix . 'workflow_element` (`workflow_element_id`);' - )->execute(); - break; - } - } -} diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php deleted file mode 100644 index 2ac473e..0000000 --- a/Admin/Routes/Web/Backend.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - [ - 'dest' => '\Modules\Workflow\Controller:viewWorkflowTemplates', - 'verb' => RouteVerb::GET, - ], - ], - '^.*/backend/workflow/template/single.*$' => [ - [ - 'dest' => '\Modules\Workflow\Controller:viewWorkflowTemplate', - 'verb' => RouteVerb::GET, - ], - ], - '^.*/backend/workflow/template/create.*$' => [ - [ - 'dest' => '\Modules\Workflow\Controller:viewWorkflowTemplateCreate', - 'verb' => RouteVerb::GET, - ], - ], - '^.*/backend/workflow/dashboard.*$' => [ - [ - 'dest' => '\Modules\Workflow\Controller:viewWorkflowDashboard', - 'verb' => RouteVerb::GET, - ], - ], - '^.*/backend/workflow/single.*$' => [ - [ - 'dest' => '\Modules\Workflow\Controller:viewWorkflowSingle', - 'verb' => RouteVerb::GET, - ], - ], -]; diff --git a/Admin/Routes/console.php b/Admin/Routes/console.php deleted file mode 100644 index 1ecbfac..0000000 --- a/Admin/Routes/console.php +++ /dev/null @@ -1,3 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Admin; - - -use phpOMS\DataStorage\Database\DatabasePool; -use phpOMS\DataStorage\Database\Schema\Builder; -use phpOMS\Module\InfoManager; -use phpOMS\Module\UninstallAbstract; - -/** - * Navigation class. - * - * @category Modules - * @package Modules\Admin - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Uninstall extends UninstallAbstract -{ - - /** - * {@inheritdoc} - */ - public static function uninstall(DatabasePool $dbPool, InfoManager $info) - { - parent::uninstall($dbPool, $info); - - $query = new Builder($dbPool->get()); - - $query->prefix($dbPool->get('core')->getPrefix())->drop( - 'task_element', - 'task_account', - 'task' - ); - - $dbPool->get()->con->prepare($query->toSql())->execute(); - } -} diff --git a/Admin/Update.php b/Admin/Update.php deleted file mode 100644 index fcc9d39..0000000 --- a/Admin/Update.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Admin; - - -use phpOMS\DataStorage\Database\DatabasePool; -use phpOMS\Module\InfoManager; -use phpOMS\Module\UpdateAbstract; -use phpOMS\System\File\Directory; - -/** - * Navigation class. - * - * @category Modules - * @package Modules\Admin - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Update extends UpdateAbstract -{ - - /** - * {@inheritdoc} - */ - public static function update(DatabasePool $dbPool, InfoManager $info) - { - Directory::deletePath(__DIR__ . '/Update'); - mkdir('Update'); - parent::update($dbPool, $info); - } -} diff --git a/Controller.php b/Controller.php deleted file mode 100644 index 012cea6..0000000 --- a/Controller.php +++ /dev/null @@ -1,174 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow; - -use phpOMS\Message\RequestAbstract; -use phpOMS\Message\ResponseAbstract; -use phpOMS\Module\ModuleAbstract; -use phpOMS\Module\WebInterface; -use phpOMS\Views\View; - -/** - * Task class. - * - * @category Modules - * @package Modules\Workflow - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Controller extends ModuleAbstract implements WebInterface -{ - - /** - * Module path. - * - * @var string - * @since 1.0.0 - */ - /* public */ const MODULE_PATH = __DIR__; - - /** - * Module version. - * - * @var string - * @since 1.0.0 - */ - /* public */ const MODULE_VERSION = '1.0.0'; - - /** - * Module name. - * - * @var string - * @since 1.0.0 - */ - /* public */ const MODULE_NAME = 'Workflow'; - - /** - * Providing. - * - * @var string - * @since 1.0.0 - */ - protected static $providing = []; - - /** - * Dependencies. - * - * @var string - * @since 1.0.0 - */ - protected static $dependencies = [ - ]; - - /** - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return \Serializable - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function viewWorkflowTemplates(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable - { - $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Workflow/Theme/Backend/workflow-template-list'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005501001, $request, $response)); - - return $view; - } - - /** - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return \Serializable - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function viewWorkflowTemplate(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable - { - $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Workflow/Theme/Backend/task-single'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005501001, $request, $response)); - - return $view; - } - - /** - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return \Serializable - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function viewWorkflowSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable - { - $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Workflow/Theme/Backend/task-create'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005501001, $request, $response)); - - return $view; - } - - /** - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return \Serializable - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function viewWorkflowTemplateCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable - { - $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Workflow/Theme/Backend/workflow-template-create'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005501001, $request, $response)); - - return $view; - } - - /** - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return \Serializable - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function viewWorkflowDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable - { - $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Workflow/Theme/Backend/workflow-dashboard'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005501001, $request, $response)); - - return $view; - } - -} diff --git a/Docs/workflow_components.md b/Docs/workflow_components.md deleted file mode 100644 index 2326e8e..0000000 --- a/Docs/workflow_components.md +++ /dev/null @@ -1,17 +0,0 @@ -# Workflow Components - -Every workflow has to provide a set of components in order to work. Other files are optional but can be used in order to enhance the experience. Additional files may be provided for better templating or for additional models but are not a necessety. - -## Template - -The `template.tpl.php` file contains the UI of the workflow. - -## States - -A `States.php` file contains all workflow states. This is especially important in order to show different content inside of the `template.tpl.php` depending on the state or in order to trigger state depended actions. - -## Workflow - -The `Workflow.php` file is the heart of every workflow. This file is responsible for executing state driven actions and it can also be seen as the API for a workflow. All workflow related actions will be forwarded to this file and can be handled inside including database queries. - -## \ No newline at end of file diff --git a/Models/Template.php b/Models/Template.php deleted file mode 100644 index 4ddffdc..0000000 --- a/Models/Template.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Models; - - - -/** - * Task class. - * - * @category Modules - * @package Framework - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Template -{ - -} diff --git a/Models/WorkflowInterface.php b/Models/WorkflowInterface.php deleted file mode 100644 index f93c698..0000000 --- a/Models/WorkflowInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Models; - -/** - * Task status enum. - * - * @category Workflow - * @package Modules - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -interface WorkflowInterface -{ - -} \ No newline at end of file diff --git a/Models/WorkflowStatus.php b/Models/WorkflowStatus.php deleted file mode 100644 index 7739c64..0000000 --- a/Models/WorkflowStatus.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Models; - -use phpOMS\Datatypes\Enum; - -/** - * Task status enum. - * - * @category Workflow - * @package Modules - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -abstract class WorkflowStatus extends Enum -{ - /* public */ const OPEN = 1; - /* public */ const WORKING = 2; - /* public */ const SUSPENDED = 3; - /* public */ const CANCELED = 4; - /* public */ const DONE = 5; - /* public */ const CLOSED = 6; -} diff --git a/README.md b/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/Templates/Permission/PermissionStatus.php b/Templates/Permission/PermissionStatus.php deleted file mode 100644 index 9e9c539..0000000 --- a/Templates/Permission/PermissionStatus.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Templates\Permission; - -use phpOMS\Datatypes\Enum; - -/** - * Task status enum. - * - * @category Tasks - * @package Modules - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -abstract class PermissionStatus extends Enum -{ - /* public */ const PENDING = 1; - /* public */ const APPROVED = 2; - /* public */ const DISMISSED = 3; -} diff --git a/Templates/Permission/States.php b/Templates/Permission/States.php deleted file mode 100644 index ff06f5d..0000000 --- a/Templates/Permission/States.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Workflow\Templates\Permission; - -use phpOMS\Datatypes\Enum; - -/** - * Task status enum. - * - * @category Tasks - * @package Modules - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -abstract class States extends Enum -{ - /* public */ const DEFAULT = 0; - /* public */ const PENDING = 1; - /* public */ const APPROVED = 2; - /* public */ const DISMISSED = 3; -} diff --git a/Templates/Permission/Workflow.php b/Templates/Permission/Workflow.php deleted file mode 100644 index 711fe42..0000000 --- a/Templates/Permission/Workflow.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -namespace Modules\Media; - -use Modules\Workflow\Models\WorkflowInterface; -use Modules\Workflow\Templates\Permission\States; -use phpOMS\DataStorage\Database\Connection\ConnectionAbstract; - -/** - * Media class. - * - * @category Modules - * @package Modules\Media - * @author OMS Development Team - * @author Dennis Eichhorn - * @license OMS License 1.0 - * @link http://orange-management.com - * @since 1.0.0 - */ -class Workflow implements WorkflowInterface -{ - private $id = 0; - private $state = 0; - private $con = null; - - public function __construct(ConnectionAbstract $con) - { - $this->con = $con; - } - - public function run($data) : int - { - switch ($this->state) { - case States::DEFAULT: - $this->state = $this->runRequest($data); - break; - case States::PENDING: - $this->state = $this->runPending($data); - break; - default: - - } - - return $this->state; - } - - public function runRequest($data) - { - // todo: create workflow - // todo: create task - // todo: set state - } - - public function runPending($data) - { - // todo: approve?! - // todo: - } - - public function getState() : int - { - return $this->state; - } -} \ No newline at end of file diff --git a/Templates/Permission/permission-info.tpl.php b/Templates/Permission/permission-info.tpl.php deleted file mode 100644 index e69de29..0000000 diff --git a/Templates/Permission/template.tpl.php b/Templates/Permission/template.tpl.php deleted file mode 100644 index e69de29..0000000 diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php deleted file mode 100644 index cf33391..0000000 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -return ['Navigation' => [ - 'Create' => 'Create', - 'Dashboard' => 'Dashboard', - 'Templates' => 'Templates', - 'Workflows' => 'Workflows', - 'Workflow' => 'Workflow', -]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php deleted file mode 100644 index 51449fe..0000000 --- a/Theme/Backend/Lang/en.lang.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -return ['Workflow' => [ - 'Created' => 'Created', - 'Creator' => 'Creator', - 'Next' => 'Next', - 'Status' => 'Status', - 'Title' => 'Title', - 'Workflow' => 'Workflow', - 'Workflows' => 'Workflows', -]]; diff --git a/Theme/Backend/workflow-create.tpl.php b/Theme/Backend/workflow-create.tpl.php deleted file mode 100644 index 6b87196..0000000 --- a/Theme/Backend/workflow-create.tpl.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -/** - * @var \phpOMS\Views\View $this - */ -echo $this->getData('nav')->render(); ?> - -
-

getText('Task'); ?>

- -
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-

getText('Media'); ?>

- -
-
- - -
-
-
-
-
-
-
-
- - \ No newline at end of file diff --git a/Theme/Backend/workflow-dashboard.tpl.php b/Theme/Backend/workflow-dashboard.tpl.php deleted file mode 100644 index ff6e97b..0000000 --- a/Theme/Backend/workflow-dashboard.tpl.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -/** - * @var \phpOMS\Views\View $this - */ -$workflows = []; - -echo $this->getData('nav')->render(); ?> - -
- - - - - - $workflow) : $c++; - $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/task/single?{?}&id=' . $workflow->getId()); - $color = 'darkred'; - if($workflow->getStatus() === \Modules\Workflow\Models\WorkflowStatus::DONE) { $color = 'green'; } - elseif($workflow->getStatus() === \Modules\Workflow\Models\WorkflowStatus::OPEN) { $color = 'darkblue'; } - elseif($workflow->getStatus() === \Modules\Workflow\Models\WorkflowStatus::WORKING) { $color = 'purple'; } - elseif($workflow->getStatus() === \Modules\Workflow\Models\WorkflowStatus::CANCELED) { $color = 'red'; } - elseif($workflow->getStatus() === \Modules\Workflow\Models\WorkflowStatus::SUSPENDED) { $color = 'yellow'; } ;?> - -
getText('Workflow'); ?>
getText('Status'); ?> - getText('Next'); ?> - getText('Title'); ?> - getText('Creator'); ?> - getText('Created'); ?> -
getText('S' . $workflow->getStatus()); ?> - getDue()->format('Y-m-d H:i'); ?> - getTitle(); ?> - getCreatedBy(); ?> - getCreatedAt()->format('Y-m-d H:i'); ?> - -
getText('Empty', 0, 0); ?> - -
-
\ No newline at end of file diff --git a/Theme/Backend/workflow-single.tpl.php b/Theme/Backend/workflow-single.tpl.php deleted file mode 100644 index ee35254..0000000 --- a/Theme/Backend/workflow-single.tpl.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -/** - * @var \phpOMS\Views\View $this - * @var \Modules\Tasks\Models\Task $task - */ -$task = $this->getData('task'); -$elements = $task->getTaskElements(); -$cElements = count($elements); - -echo $this->getData('nav')->render(); ?> - -
-

getTitle(); ?>

-
-
Due getDue()->format('Y-m-d H:i'); ?>
-
Created getCreatedAt()->format('Y-m-d H:i'); ?>
-
- getDescription(); ?> -
-
Created getCreatedBy(); ?>
-
Status getStatus(); ?>
-
-
- - $element) : $c++; - if($element->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; } - elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::OPEN) { $color = 'darkblue'; } - elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::WORKING) { $color = 'purple'; } - elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; } - elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ?> -
-
getText('S' . $element->getStatus()); ?>
-
getCreatedBy(); ?> - getCreatedAt()->format('Y-m-d H:i'); ?>
-
- getDescription() !== '') : ?> -
-
-
- getDescription(); ?> -
-
-
- -
- getStatus() !== \Modules\Tasks\Models\TaskStatus::CANCELED || - $element->getStatus() !== \Modules\Tasks\Models\TaskStatus::DONE || - $element->getStatus() !== \Modules\Tasks\Models\TaskStatus::SUSPENDED || $c != $cElements - ) : ?> -
Due getDue()->format('Y-m-d H:i'); ?>
- - getForwarded() !== 0) : ?> -
Forwarded getForwarded(); ?>
- -
- - -
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Theme/Backend/workflow-template-create.tpl.php b/Theme/Backend/workflow-template-create.tpl.php deleted file mode 100644 index 9e3f926..0000000 --- a/Theme/Backend/workflow-template-create.tpl.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -/** - * @var \phpOMS\Views\View $this - */ -echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/workflow-template-list.tpl.php b/Theme/Backend/workflow-template-list.tpl.php deleted file mode 100644 index 2404c47..0000000 --- a/Theme/Backend/workflow-template-list.tpl.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @author Dennis Eichhorn - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link http://orange-management.com - */ -/** - * @var \phpOMS\Views\View $this - * @var \Modules\Tasks\Models\Task[] $tasks - */ -$tasks = $this->getData('tasks'); -echo $this->getData('nav')->render(); ?> - diff --git a/img/module_teaser_small.png b/img/module_teaser_small.png deleted file mode 100644 index f56e6ff..0000000 Binary files a/img/module_teaser_small.png and /dev/null differ diff --git a/info.json b/info.json deleted file mode 100644 index a642254..0000000 --- a/info.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": { - "id": 1005500000, - "internal": "Workflow", - "external": "OMS Workflow" - }, - "version": "1.0.0", - "requirements": { - "phpOMS": "1.0.0", - "phpOMS-db": "1.0.0" - }, - "creator": { - "name": "Orange Management", - "website": "www.spl1nes.com" - }, - "description": "Workflow module.", - "directory": "Workflow", - "dependencies": { - "Admin" : "1.0.0", - "Calendar" : "1.0.0" - }, - "providing": { - "Navigation": "*" - }, - "load": [ - { - "pid": [ - "ac3d9bdf783c7963f449488e33c60133b3dbe6f8" - ], - "type": 4, - "for": 0, - "from": "Workflow", - "file": "Workflow" - }, - { - "pid": [ - "754a08ddf8bcb1cf22f310f09206dd783d42f7dd" - ], - "type": 5, - "from": "Workflow", - "for": "Navigation", - "file": "Navigation" - } - ] -}