Commit d259261b authored by waltermazza's avatar waltermazza
Browse files

Arter namespace

parent cfa6b2b3
......@@ -14,13 +14,13 @@ Installation
Either run
```bash
composer require elitedivision/amos-workflow
composer require arter/amos-workflow
```
or add this row
```
"elitedivision/amos-workflow": "dev-master"
"arter/amos-workflow": "dev-master"
```
to the require section of your `composer.json` file.
......@@ -31,7 +31,7 @@ to the require section of your `composer.json` file.
'modules' => [
'workflow' => [
'class' => 'elitedivision\amos\workflow\AmosWorkflow',
'class' => 'arter\amos\workflow\AmosWorkflow',
],
],
```
......@@ -40,7 +40,7 @@ to the require section of your `composer.json` file.
a. amos-workflow migrations
```bash
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-workflow/src/migrations
php yii migrate/up --migrationPath=@vendor/arter/amos-workflow/src/migrations
```
or add this row to your migrations config in console:
......@@ -50,7 +50,7 @@ to the require section of your `composer.json` file.
.
.
.
'@vendor/elitedivision/amos-workflow/src/migrations',
'@vendor/arter/amos-workflow/src/migrations',
.
.
.
......@@ -117,7 +117,7 @@ Amos Workflow provides three Widgets:
//TODO explain/example of use for new widgets above
* **WorkflowTransitionWidget** *elitedivision\amos\workflow\widgets\WorkflowTransitionWidget*
* **WorkflowTransitionWidget** *arter\amos\workflow\widgets\WorkflowTransitionWidget*
Draws a section containing model current status and the buttons with possible status to change starting from the current one (reading from sw_metadata).
***Comment / notes on status change***
If needed, it is possible to show a popup to insert comment/notes on status change; to enable the functionality add in sw_metadata for the transition final status the metadata: key ='comment', value = 1
......
......@@ -6,14 +6,14 @@
"yii2",
"workflow"
],
"homepage": "http://www.elitedivision.it/",
"homepage": "http://www.arter.it/",
"type": "component",
"license": "BSD-3-Clause",
"support": {
"issues": "http://www.example.com/",
"forum": "http://www.example.com/forum/",
"wiki": "http://www.example.com/wiki/",
"source": "https://github.com/elitedivision/amos-workflow"
"source": "https://github.com/arter/amos-workflow"
},
"minimum-stability": "stable",
"require": {
......@@ -30,7 +30,7 @@
},
"autoload": {
"psr-4": {
"elitedivision\\amos\\workflow\\": "src"
"arter\\amos\\workflow\\": "src"
}
}
}
\ No newline at end of file
......@@ -5,24 +5,24 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow
* @package arter\amos\workflow
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow;
namespace arter\amos\workflow;
use elitedivision\amos\core\module\Module;
use elitedivision\amos\core\module\ModuleInterface;
use elitedivision\amos\core\record\Record;
use elitedivision\amos\workflow\components\events\SimpleWorkFlowEventsListener;
use arter\amos\core\module\Module;
use arter\amos\core\module\ModuleInterface;
use arter\amos\core\record\Record;
use arter\amos\workflow\components\events\SimpleWorkFlowEventsListener;
use raoul2000\workflow\base\SimpleWorkflowBehavior;
use Yii;
use yii\base\Event;
/**
* Class AmosWorkflow
* @package elitedivision\amos\workflow
* @package arter\amos\workflow
*/
class AmosWorkflow extends Module implements ModuleInterface
{
......
......@@ -5,22 +5,22 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow\behaviors
* @package arter\amos\workflow\behaviors
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\behaviors;
namespace arter\amos\workflow\behaviors;
use elitedivision\amos\core\record\Record;
use elitedivision\amos\workflow\components\events\SimpleWorkFlowEventsListener;
use elitedivision\amos\workflow\models\WorkflowTransitionsLog;
use arter\amos\core\record\Record;
use arter\amos\workflow\components\events\SimpleWorkFlowEventsListener;
use arter\amos\workflow\models\WorkflowTransitionsLog;
use yii\base\Behavior;
use yii\helpers\Json;
/**
* Class WorkflowLogFunctionsBehavior
* @package elitedivision\amos\workflow\behaviors
* @package arter\amos\workflow\behaviors
*/
class WorkflowLogFunctionsBehavior extends Behavior
{
......
......@@ -5,15 +5,15 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow
* @package arter\amos\workflow
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\components\events;
namespace arter\amos\workflow\components\events;
use elitedivision\amos\workflow\models\WorkflowTransitionsLog;
use elitedivision\amos\core\record\Record;
use arter\amos\workflow\models\WorkflowTransitionsLog;
use arter\amos\core\record\Record;
use raoul2000\workflow\events\WorkflowEvent;
use yii\base\Component;
use yii\db\ActiveQuery;
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow
* @package arter\amos\workflow
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow\migrations
* @package arter\amos\workflow\migrations
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow\migrations
* @package arter\amos\workflow\migrations
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,14 +5,14 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow
* @package arter\amos\workflow
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\models;
namespace arter\amos\workflow\models;
use elitedivision\amos\workflow\models\base\WorkflowTransitionsLog as WorkflowTransitionsLogBase;
use arter\amos\workflow\models\base\WorkflowTransitionsLog as WorkflowTransitionsLogBase;
/**
* This is the model class for table "workflow_transitions_log".
*/
......
......@@ -5,12 +5,12 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow
* @package arter\amos\workflow
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\models\base;
namespace arter\amos\workflow\models\base;
use Yii;
use yii\helpers\Json;
......@@ -32,7 +32,7 @@ use yii\helpers\Json;
* @property integer $updated_by
* @property integer $deleted_by
*/
class WorkflowTransitionsLog extends \elitedivision\amos\core\record\Record
class WorkflowTransitionsLog extends \arter\amos\core\record\Record
{
/**
......
......@@ -5,25 +5,25 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow\widgets
* @package arter\amos\workflow\widgets
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\widgets;
namespace arter\amos\workflow\widgets;
use DOMDocument;
use elitedivision\amos\core\controllers\CrudController;
use elitedivision\amos\core\forms\ActiveField;
use elitedivision\amos\core\forms\ActiveForm;
use elitedivision\amos\core\forms\CloseSaveButtonWidget;
use elitedivision\amos\core\helpers\Html;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\record\ContentModel;
use elitedivision\amos\core\record\Record;
use elitedivision\amos\core\utilities\ModalUtility;
use elitedivision\amos\core\utilities\WorkflowTransitionWidgetUtility;
use elitedivision\amos\workflow\AmosWorkflow;
use arter\amos\core\controllers\CrudController;
use arter\amos\core\forms\ActiveField;
use arter\amos\core\forms\ActiveForm;
use arter\amos\core\forms\CloseSaveButtonWidget;
use arter\amos\core\helpers\Html;
use arter\amos\core\module\AmosModule;
use arter\amos\core\record\ContentModel;
use arter\amos\core\record\Record;
use arter\amos\core\utilities\ModalUtility;
use arter\amos\core\utilities\WorkflowTransitionWidgetUtility;
use arter\amos\workflow\AmosWorkflow;
use kartik\base\Widget;
use raoul2000\workflow\base\Status;
use raoul2000\workflow\base\Transition;
......@@ -33,7 +33,7 @@ use yii\helpers\ArrayHelper;
/**
* Class WorkflowTransitionButtonsWidget
* Renders the widget useful to change a model workflow status.
* @package elitedivision\amos\workflow\widgets
* @package arter\amos\workflow\widgets
*/
class WorkflowTransitionButtonsWidget extends Widget
{
......@@ -680,14 +680,14 @@ class WorkflowTransitionButtonsWidget extends Widget
{
$notifyModule = \Yii::$app->getModule('notify');
if (!empty($notifyModule)
&& $this->model instanceof \elitedivision\amos\notificationmanager\record\NotifyRecord
&& $this->model instanceof \elitedivision\amos\core\interfaces\WorkflowModelInterface
&& $this->model instanceof \arter\amos\notificationmanager\record\NotifyRecord
&& $this->model instanceof \arter\amos\core\interfaces\WorkflowModelInterface
&& $this->model instanceof ContentModel
) {
if ($this->model->hasProperty('saveNotificationSendEmail') && !empty($notifyModule->confirmEmailNotification) && $notifyModule->confirmEmailNotification == true) {
$validatedStatus = $this->model->getValidatedStatus();
$isValidatedOnce = $this->model->getValidatedOnce();
$emailNotificated = \elitedivision\amos\notificationmanager\models\NotificationSendEmail::findOne(['classname' => get_class($this->model), 'content_id' => $this->model->id]);
$emailNotificated = \arter\amos\notificationmanager\models\NotificationSendEmail::findOne(['classname' => get_class($this->model), 'content_id' => $this->model->id]);
if (empty($emailNotificated)) {
// the modal is shown if you click (Validate/publish) or after the validation if you have not selected yes on send notification
// the first time you click for submit open the modal enc do the prevent default, if in the modal click yes, trigger again the submit without open the modal
......
......@@ -5,17 +5,17 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow\widgets
* @package arter\amos\workflow\widgets
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\widgets;
namespace arter\amos\workflow\widgets;
use DOMDocument;
use elitedivision\amos\core\forms\CloseSaveButtonWidget;
use elitedivision\amos\core\module\BaseAmosModule;
use elitedivision\amos\core\record\Record;
use arter\amos\core\forms\CloseSaveButtonWidget;
use arter\amos\core\module\BaseAmosModule;
use arter\amos\core\record\Record;
use raoul2000\workflow\base\Status;
use yii\base\InvalidConfigException;
......@@ -24,7 +24,7 @@ use yii\base\InvalidConfigException;
* Renders the widget useful to change a model workflow status showing
* only a save button for the user.
*
* @package elitedivision\amos\workflow\widgets
* @package arter\amos\workflow\widgets
*/
class WorkflowTransitionSimplifiedButtonsWidget extends WorkflowTransitionButtonsWidget
{
......@@ -174,7 +174,7 @@ class WorkflowTransitionSimplifiedButtonsWidget extends WorkflowTransitionButton
$inState = $this->model->status;
if (!is_array($this->transitionStatuses)) {
throw new InvalidConfigException("\\elitedivision\amos\workflow\widgets\WorkflowTransitionSimplifiedButtonsWidget:\n the param transitionStatuses must be an array.");
throw new InvalidConfigException("\\arter\amos\workflow\widgets\WorkflowTransitionSimplifiedButtonsWidget:\n the param transitionStatuses must be an array.");
}
$saveButton = [];
......
......@@ -5,19 +5,19 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\workflow\widgets
* @package arter\amos\workflow\widgets
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\widgets;
namespace arter\amos\workflow\widgets;
use elitedivision\amos\core\controllers\CrudController;
use elitedivision\amos\core\forms\ActiveForm;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\module\BaseAmosModule;
use elitedivision\amos\core\record\Record;
use elitedivision\amos\core\utilities\WorkflowTransitionWidgetUtility;
use arter\amos\core\controllers\CrudController;
use arter\amos\core\forms\ActiveForm;
use arter\amos\core\module\AmosModule;
use arter\amos\core\module\BaseAmosModule;
use arter\amos\core\record\Record;
use arter\amos\core\utilities\WorkflowTransitionWidgetUtility;
use kartik\base\Widget;
use raoul2000\workflow\base\Status;
......@@ -25,7 +25,7 @@ use raoul2000\workflow\base\Status;
* Class WorkflowTransitionStateDescriptorWidget
* Renders the widget useful to view the workflow status of a model.
*
* @package elitedivision\amos\core\forms
* @package arter\amos\core\forms
*/
class WorkflowTransitionStateDescriptorWidget extends Widget
{
......
......@@ -5,19 +5,19 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\core\forms
* @package arter\amos\core\forms
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\workflow\widgets;
namespace arter\amos\workflow\widgets;
use elitedivision\amos\core\controllers\CrudController;
use elitedivision\amos\core\forms\CloseSaveButtonWidget;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\module\BaseAmosModule;
use elitedivision\amos\core\record\Record;
use arter\amos\core\controllers\CrudController;
use arter\amos\core\forms\CloseSaveButtonWidget;
use arter\amos\core\icons\AmosIcons;
use arter\amos\core\module\AmosModule;
use arter\amos\core\module\BaseAmosModule;
use arter\amos\core\record\Record;
use kartik\base\Widget;
use kartik\select2\Select2;
use raoul2000\workflow\base\Status;
......@@ -29,7 +29,7 @@ use yii\db\ActiveRecord;
* Class WorkflowStateWidget
* Renders the widget useful to change a model workflow status.
*
* @package elitedivision\amos\core\forms
* @package arter\amos\core\forms
*/
class WorkflowTransitionWidget extends Widget
{
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\core\forms
* @package arter\amos\core\forms
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment