Commit 977d6f4f authored by waltermazza's avatar waltermazza
Browse files

Arter namespace

parent 7906a150
......@@ -10,13 +10,13 @@ Installation
Either run
```bash
composer require elitedivision/amos-tag
composer require arter/amos-tag
```
or add this row
```
"elitedivision/amos-tag": "dev-master"
"arter/amos-tag": "dev-master"
```
to the require section of your `composer.json` file.
......@@ -27,11 +27,11 @@ to the require section of your `composer.json` file.
'modules' => [
'tag' => [
'class' => 'elitedivision\amos\tag\AmosTag',
'class' => 'arter\amos\tag\AmosTag',
'modelsEnabled' => [
/**
* Add here the classnames of the models for whose you want to enable tags
* (i.e. 'elitedivision\amos\news\models\News')
* (i.e. 'arter\amos\news\models\News')
*/
]
],
......@@ -45,7 +45,7 @@ to the require section of your `composer.json` file.
a. amos-tag migrations
```bash
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-tag/src/migrations
php yii migrate/up --migrationPath=@vendor/arter/amos-tag/src/migrations
```
or add this row to your migrations config in console:
......@@ -55,7 +55,7 @@ to the require section of your `composer.json` file.
.
.
.
'@vendor/elitedivision/amos-tag/src/migrations',
'@vendor/arter/amos-tag/src/migrations',
.
.
.
......@@ -75,11 +75,11 @@ Widgets
-----------
Amos Tag provides two Widgets:
* **TagWidget** *elitedivision\amos\tag\widgets\TagWidget*
* **TagWidget** *arter\amos\tag\widgets\TagWidget*
Draws tag tree to select values for a model.
example of use in a form:
```php
echo elitedivision\amos\tag\widgets\TagWidget::widget([
echo arter\amos\tag\widgets\TagWidget::widget([
'model' => $model,
'attribute' => 'tagValues',
'form' => \yii\base\Widget::$stack[0],
......@@ -92,7 +92,7 @@ example of use in a form:
In a search form you can use the same widget with options :
```php
$params = \Yii::$app->request->getQueryParams();
echo \elitedivision\amos\tag\widgets\TagWidget::widget([
echo \arter\amos\tag\widgets\TagWidget::widget([
'model' => $model,
'attribute' => 'tagValues',
'form' => $form,
......@@ -104,13 +104,13 @@ echo \elitedivision\amos\tag\widgets\TagWidget::widget([
If singleFixedTreeId is not specified, all enabled trees for the $model are considered (table tag_models_auth_items_mm).
singleFixedTreeId is now possible an array (tag roots in singleFixedTreeId will be considered).
* **ShowTagsWidget** *elitedivision\amos\tag\widgets\ShowTagsWidget*
* **ShowTagsWidget** *arter\amos\tag\widgets\ShowTagsWidget*
Draws the selected tags for a model (in view mode).
It is possible to specify a tree (property 'rootId') or a set of trees (property 'rootIdsArray') to show; if nothing is specified, all enabled trees for the model are considered.
Example:
```
<?= \elitedivision\amos\tag\widgets\ShowTagsWidget::widget([
<?= \arter\amos\tag\widgets\ShowTagsWidget::widget([
'model' => $model,
'rootId' => $rootId
]) ?>
......
......@@ -33,7 +33,7 @@
},
"autoload": {
"psr-4": {
"elitedivision\\amos\\tag\\": "src"
"arter\\amos\\tag\\": "src"
}
},
"require-dev": {
......
......@@ -5,22 +5,22 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\tag;
namespace arter\amos\tag;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\record\Record;
use elitedivision\amos\tag\widgets\icons\WidgetIconTag;
use elitedivision\amos\tag\widgets\icons\WidgetIconTagManager;
use arter\amos\core\module\AmosModule;
use arter\amos\core\record\Record;
use arter\amos\tag\widgets\icons\WidgetIconTag;
use arter\amos\tag\widgets\icons\WidgetIconTagManager;
use Yii;
class AmosTag extends AmosModule {
public $controllerNamespace = 'elitedivision\amos\tag\controllers';
public $controllerNamespace = 'arter\amos\tag\controllers';
/**
* @var string
......@@ -33,7 +33,7 @@ class AmosTag extends AmosModule {
public $modelsEnabled = [
];
public $behaviors = [
'elitedivision\amos\core\behaviors\TaggableBehavior'
'arter\amos\core\behaviors\TaggableBehavior'
];
public $name = 'Tag';
......@@ -46,7 +46,7 @@ class AmosTag extends AmosModule {
parent::init();
Record::$modulesChainBehavior[] = 'tag';
Yii::setAlias('@elitedivision/amos/' . static::getModuleName() . '/controllers', __DIR__ . '/controllers');
Yii::setAlias('@arter/amos/' . static::getModuleName() . '/controllers', __DIR__ . '/controllers');
//aggiunge le configurazioni trovate nel file config/config.php
Yii::configure($this, require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'));
......
......@@ -5,18 +5,18 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\tag\assets;
namespace arter\amos\tag\assets;
use yii\web\AssetBundle;
class ModuleTagAsset extends AssetBundle
{
public $sourcePath = '@vendor/elitedivision/amos-tag/src/assets/web';
public $sourcePath = '@vendor/arter/amos-tag/src/assets/web';
public $css = [
];
......@@ -30,9 +30,9 @@ class ModuleTagAsset extends AssetBundle
{
$moduleL = \Yii::$app->getModule('layout');
if(!empty($moduleL))
{ $this->depends [] = 'elitedivision\amos\layout\assets\BaseAsset'; }
{ $this->depends [] = 'arter\amos\layout\assets\BaseAsset'; }
else
{ $this->depends [] = 'elitedivision\amos\core\views\assets\AmosCoreAsset'; }
{ $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset'; }
parent::init(); // TODO: Change the autogenerated stub
}
}
......@@ -5,19 +5,19 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\tag\assets;
namespace arter\amos\tag\assets;
use elitedivision\amos\core\widget\WidgetAbstract;
use arter\amos\core\widget\WidgetAbstract;
use yii\web\AssetBundle;
class ModuleTagFormAsset extends AssetBundle
{
public $sourcePath = '@vendor/elitedivision/amos-tag/src/assets/web';
public $sourcePath = '@vendor/arter/amos-tag/src/assets/web';
public $css = [
'less/tag.less'
......@@ -44,9 +44,9 @@ class ModuleTagFormAsset extends AssetBundle
}
if(!empty($moduleL))
{ $this->depends [] = 'elitedivision\amos\layout\assets\BaseAsset'; }
{ $this->depends [] = 'arter\amos\layout\assets\BaseAsset'; }
else
{ $this->depends [] = 'elitedivision\amos\core\views\assets\AmosCoreAsset'; }
{ $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset'; }
parent::init();
}
}
@import (optional) "../../vendor/elitedivision/amos-core/views/assets/web/css/less/variables.less";
@import (optional) "../../vendor/arter/amos-core/views/assets/web/css/less/variables.less";
/**
IMPORT AMOS-LAYOUT VARIABLES
*/
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/variables.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/variables.less";
/**
IMPORT STYLE-CUSTOM
*/
......
/**
IMPORT AMOS-LAYOUT VARIABLES
*/
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/utility.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/utility.less";
/**
IMPORT STYLE-CUSTOM
*/
......
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/variables.less";
@import (optional) "../../vendor/elitedivision/amos-core/views/assets/web/css/less/variables.less";
\ No newline at end of file
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/variables.less";
@import (optional) "../../vendor/arter/amos-core/views/assets/web/css/less/variables.less";
\ No newline at end of file
......@@ -5,12 +5,12 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\tag\behaviors;
namespace arter\amos\tag\behaviors;
class NestedSetsQueryBehavior extends \creocoder\nestedsets\NestedSetsQueryBehavior
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,14 +5,14 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\tag\controllers;
namespace arter\amos\tag\controllers;
use elitedivision\amos\dashboard\controllers\base\DashboardController;
use arter\amos\dashboard\controllers\base\DashboardController;
use yii\helpers\Url;
class DefaultController extends DashboardController
......@@ -57,7 +57,7 @@ class DefaultController extends DashboardController
}
$module = \Yii::$app->getModule('layout');
if(empty($module)){
$this->layout = '@vendor/elitedivision/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
$this->layout = '@vendor/arter/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
return true;
}
$this->layout = (!empty($layout)) ? $layout : $this->layout;
......
......@@ -5,12 +5,12 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\tag\controllers;
namespace arter\amos\tag\controllers;
use yii\base\Controller;
use yii\filters\AccessControl;
......@@ -82,7 +82,7 @@ class ManagerController extends Controller
}
$module = \Yii::$app->getModule('layout');
if(empty($module)){
$this->layout = '@vendor/elitedivision/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
$this->layout = '@vendor/arter/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
return true;
}
$this->layout = (!empty($layout)) ? $layout : $this->layout;
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag\i18n\en-GB
* @package arter\amos\tag\i18n\en-GB
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag\i18n\en-US
* @package arter\amos\tag\i18n\en-US
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag\i18n\it-IT
* @package arter\amos\tag\i18n\it-IT
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
......@@ -18,12 +18,12 @@ class m160912_084210_permissions_tag extends \yii\db\Migration
public function safeUp()
{
$this->insert(self::TABLE_PERMISSION, [
'name' => \elitedivision\amos\tag\widgets\icons\WidgetIconTag::className(),
'name' => \arter\amos\tag\widgets\icons\WidgetIconTag::className(),
'type' => '2',
'description' => 'Permesso di VIEW sul widget WidgetIconTag'
]);
$this->insert(self::TABLE_PERMISSION, [
'name' => \elitedivision\amos\tag\widgets\icons\WidgetIconTagManager::className(),
'name' => \arter\amos\tag\widgets\icons\WidgetIconTagManager::className(),
'type' => '2',
'description' => 'Permesso di VIEW sul widget WidgetIconTagManager'
]);
......@@ -32,11 +32,11 @@ class m160912_084210_permissions_tag extends \yii\db\Migration
public function safeDown()
{
$this->delete(self::TABLE_PERMISSION, [
'name' => \elitedivision\amos\tag\widgets\icons\WidgetIconTag::className()
'name' => \arter\amos\tag\widgets\icons\WidgetIconTag::className()
]);
echo "Eliminato il permesso: " . 'WIDGETICONTAG_VIEW';
$this->delete(self::TABLE_PERMISSION, [
'name' => \elitedivision\amos\tag\widgets\icons\WidgetIconTagManager::className()
'name' => \arter\amos\tag\widgets\icons\WidgetIconTagManager::className()
]);
echo "Eliminato il permesso: " . 'WIDGETICONTAGMANAGER_VIEW';
return true;
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
......@@ -18,7 +18,7 @@ class m160919_091930_tag_models_auth_items_mm extends Migration
public function __construct()
{
$this->tabella = \elitedivision\amos\tag\models\TagModelsAuthItemsMm::tableName();
$this->tabella = \arter\amos\tag\models\TagModelsAuthItemsMm::tableName();
parent::__construct();
}
......
......@@ -5,13 +5,13 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\tag
* @package arter\amos\tag
* @category CategoryName
* @author Elite Division S.r.l.
*/
use yii\db\Migration;
use elitedivision\amos\dashboard\models\AmosWidgets;
use arter\amos\dashboard\models\AmosWidgets;
class m160926_055506_tag_create_widgets extends Migration
{
......@@ -33,14 +33,14 @@ class m160926_055506_tag_create_widgets extends Migration
{
$this->widgets = [
[
'classname' => \elitedivision\amos\tag\widgets\icons\WidgetIconTagManager::className(),
'classname' => \arter\amos\tag\widgets\icons\WidgetIconTagManager::className(),
'type' => AmosWidgets::TYPE_ICON,
'module' => self::MODULE_NAME,
'status' => AmosWidgets::STATUS_ENABLED,
'child_of' => \elitedivision\amos\tag\widgets\icons\WidgetIconTag::className()
'child_of' => \arter\amos\tag\widgets\icons\WidgetIconTag::className()
],
[
'classname' => \elitedivision\amos\tag\widgets\icons\WidgetIconTag::className(),
'classname' => \arter\amos\tag\widgets\icons\WidgetIconTag::className(),
'type' => AmosWidgets::TYPE_ICON,
'module' => self::MODULE_NAME,
'status' => AmosWidgets::STATUS_ENABLED
......
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