Commit 909c89eb authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent f6f9c8bb
......@@ -11,13 +11,13 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run
```bash
composer require arter/amos-favorites
composer require elitedivision/amos-favorites
```
or add this row
```
"arter/amos-favorites": "dev-master"
"elitedivision/amos-favorites": "dev-master"
```
to the require section of your `composer.json` file.
......@@ -30,11 +30,11 @@ Add module to your main config in backend like this:
<?php
'modules' => [
'favorites' => [
'class' => 'arter\amos\favorites\AmosFavorites',
'class' => 'elitedivision\amos\favorites\AmosFavorites',
'modelsEnabled' => [
/**
* Add here the classnames of the models where you want the comments
* (i.e. 'arter\amos\news\models\News')
* (i.e. 'elitedivision\amos\news\models\News')
*/
]
],
......@@ -46,7 +46,7 @@ Add module to your main config in backend like this:
To apply migrations you can launch this command:
```bash
php yii migrate/up --migrationPath=@vendor/arter/amos-favorites/src/migrations
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-favorites/src/migrations
```
or add this row to your migrations config in console:
......@@ -54,6 +54,6 @@ or add this row to your migrations config in console:
```php
<?php
return [
'@vendor/arter/amos-favorites/src/migrations',
'@vendor/elitedivision/amos-favorites/src/migrations',
];
```
{
"name": "arter/amos-favorites",
"name": "elitedivision/amos-favorites",
"description": "Favorites - plugin",
"keywords": ["amos", "yii2", "favorites"],
"type": "plugin",
"license": "BSD-3-Clause",
"require": {
"php": ">=5.4.0",
"arter/amos-core": "~1.9",
"arter/amos-admin": ">=1.8",
"arter/amos-notify": "*"
"elitedivision/amos-core": "~1.9",
"elitedivision/amos-admin": ">=1.8",
"elitedivision/amos-notify": "*"
},
"extra": {
"asset-installer-paths": {
......@@ -18,7 +18,7 @@
},
"autoload": {
"psr-4": {
"arter\\amos\\favorites\\": "src"
"elitedivision\\amos\\favorites\\": "src"
}
}
}
\ No newline at end of file
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites
* @package elitedivision\amos\favorites
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\favorites;
namespace elitedivision\amos\favorites;
use arter\amos\core\module\AmosModule;
use arter\amos\core\module\ModuleInterface;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\module\ModuleInterface;
/**
* Class AmosFavorites
* @package arter\amos\favorites
* @package elitedivision\amos\favorites
*/
class AmosFavorites extends AmosModule implements ModuleInterface
{
......@@ -36,7 +36,7 @@ class AmosFavorites extends AmosModule implements ModuleInterface
/**
* @inheritdoc
*/
public $controllerNamespace = 'arter\amos\favorites\controllers';
public $controllerNamespace = 'elitedivision\amos\favorites\controllers';
public $newFileMode = 0666;
......@@ -61,7 +61,7 @@ class AmosFavorites extends AmosModule implements ModuleInterface
public function init()
{
parent::init();
\Yii::setAlias('@arter/amos/' . static::getModuleName() . '/controllers/', __DIR__ . '/controllers/');
\Yii::setAlias('@elitedivision/amos/' . static::getModuleName() . '/controllers/', __DIR__ . '/controllers/');
// custom initialization code goes here
\Yii::configure($this, require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'));
}
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites\config
* @package elitedivision\amos\favorites\config
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
return [
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites\controllers
* @package elitedivision\amos\favorites\controllers
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\favorites\controllers;
namespace elitedivision\amos\favorites\controllers;
use arter\amos\core\record\Record;
use arter\amos\favorites\AmosFavorites;
use arter\amos\favorites\exceptions\FavoritesException;
use arter\amos\favorites\widgets\FavoriteWidget;
use arter\amos\notificationmanager\AmosNotify;
use elitedivision\amos\core\record\Record;
use elitedivision\amos\favorites\AmosFavorites;
use elitedivision\amos\favorites\exceptions\FavoritesException;
use elitedivision\amos\favorites\widgets\FavoriteWidget;
use elitedivision\amos\notificationmanager\AmosNotify;
use Yii;
use yii\web\Controller as YiiController;
use yii\web\NotFoundHttpException;
/**
* Class FavoriteController
* @package arter\amos\favorites\controllers
* @package elitedivision\amos\favorites\controllers
*/
class FavoriteController extends YiiController
{
......@@ -179,7 +179,7 @@ class FavoriteController extends YiiController
}
$module = \Yii::$app->getModule('layout');
if(empty($module)){
$this->layout = '@vendor/arter/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
$this->layout = '@vendor/elitedivision/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
return true;
}
$this->layout = (!empty($layout)) ? $layout : $this->layout;
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites\exceptions
* @package elitedivision\amos\favorites\exceptions
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\favorites\exceptions;
namespace elitedivision\amos\favorites\exceptions;
/**
* Class FavoritesException
* @package arter\amos\favorites\exceptions
* @package elitedivision\amos\favorites\exceptions
*/
class FavoritesException extends \Exception
{
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Elite Division S.r.l.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites\i18n\en-GB
* @package elitedivision\amos\favorites\i18n\en-GB
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Elite Division S.r.l.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites\i18n\en-US
* @package elitedivision\amos\favorites\i18n\en-US
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Elite Division S.r.l.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites\i18n\it-IT
* @package elitedivision\amos\favorites\i18n\it-IT
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\favorites\widgets
* @package elitedivision\amos\favorites\widgets
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\favorites\widgets;
namespace elitedivision\amos\favorites\widgets;
use arter\amos\core\helpers\Html;
use arter\amos\core\icons\AmosIcons;
use arter\amos\favorites\AmosFavorites;
use arter\amos\favorites\exceptions\FavoritesException;
use arter\amos\notificationmanager\AmosNotify;
use elitedivision\amos\core\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\favorites\AmosFavorites;
use elitedivision\amos\favorites\exceptions\FavoritesException;
use elitedivision\amos\notificationmanager\AmosNotify;
use yii\base\Widget;
use yii\web\View;
......@@ -28,14 +28,14 @@ use yii\web\View;
*
* Widget to show the favorite icon.
*
* @package arter\amos\favorites\widgets
* @package elitedivision\amos\favorites\widgets
*/
class FavoriteWidget extends Widget
{
public $layout = '{beginContainerSection}{favoriteButton}{endContainerSection}';
/**
* @var \arter\amos\core\record\Record $model
* @var \elitedivision\amos\core\record\Record $model
*/
public $model;
......
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