Commit 7d88dfc1 authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent c4ff4ea4
......@@ -11,13 +11,13 @@ Installation
Either run
```bash
composer require elitedivision/amos-comments
composer require arter/amos-comments
```
or add this row
```
"elitedivision/amos-comments": "dev-master"
"arter/amos-comments": "dev-master"
```
to the require section of your `composer.json` file.
......@@ -28,11 +28,11 @@ to the require section of your `composer.json` file.
<?php
'modules' => [
'comments' => [
'class' => 'elitedivision\amos\comments\AmosComments',
'class' => 'arter\amos\comments\AmosComments',
'modelsEnabled' => [
/**
* Add here the classnames of the models where you want the comments
* (i.e. 'elitedivision\amos\events\models\Event')
* (i.e. 'arter\amos\events\models\Event')
*/
],
// the following are mandatory fields
......@@ -57,7 +57,7 @@ Also, add these lines to your bootstrap:
<?php
'components' => [
'view' => [
'class' => 'elitedivision\amos\core\components\AmosView',
'class' => 'arter\amos\core\components\AmosView',
],
],
```
......@@ -65,7 +65,7 @@ Also, add these lines to your bootstrap:
4 Apply migrations
```bash
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-comments/src/migrations
php yii migrate/up --migrationPath=@vendor/arter/amos-comments/src/migrations
```
or add this row to your migrations config in console:
......@@ -73,7 +73,7 @@ or add this row to your migrations config in console:
```php
<?php
return [
'@vendor/elitedivision/amos-comments/src/migrations',
'@vendor/arter/amos-comments/src/migrations',
];
```
......@@ -81,7 +81,7 @@ return [
```php
<?php
use elitedivision\amos\comments\models\CommentInterface;
use arter\amos\comments\models\CommentInterface;
/**
* Implement the CommentInterface
......@@ -103,7 +103,7 @@ public function isCommentable()
<?php
'modules' => [
'comments' => [
'class' => 'elitedivision\amos\comments\AmosComments',
'class' => 'arter\amos\comments\AmosComments',
'modelsEnabled' => [
'class_namespace\MyClass'
]
......@@ -118,7 +118,7 @@ public function isCommentable()
<?php
'modules' => [
'comments' => [
'class' => 'elitedivision\amos\comments\AmosComments',
'class' => 'arter\amos\comments\AmosComments',
'enableMailsNotification' => false,
'modelsEnabled' => [
'class_namespace\MyClass'
......@@ -133,9 +133,9 @@ you can insert an array
```php
'comments' => [
'htmlMailContent' => [
'elitedivision\amos\news\models\News' => '@backend/mail/comment/content_news',
'elitedivision\amos\discussioni\models\DiscussioniTopic' => '@backend/mail/comment/content_discussioni',
'elitedivision\amos\documenti\models\Documenti' => '@backend/mail/comment/content_documenti'
'arter\amos\news\models\News' => '@backend/mail/comment/content_news',
'arter\amos\discussioni\models\DiscussioniTopic' => '@backend/mail/comment/content_discussioni',
'arter\amos\documenti\models\Documenti' => '@backend/mail/comment/content_documenti'
],
```
or a string if the conente is valid for all contents(news/discussioni/docuemnts/ecc..)
......
{
"name": "elitedivision/amos-comments",
"name": "arter/amos-comments",
"description": "Comments for contents - plugin",
"keywords": ["amos", "yii2", "comments"],
"type": "plugin",
"license": "BSD-3-Clause",
"proscription": "BSD-3-Clause",
"require": {
"php": ">=5.4.0",
"elitedivision/amos-admin": "^2.0",
"elitedivision/amos-attachments": "^1.1.9",
"elitedivision/amos-core": "^1.20.2"
"arter/amos-admin": "^2.0",
"arter/amos-attachments": "^1.1.9",
"arter/amos-core": "^1.20.2"
},
"extra": {
"asset-installer-paths": {
......@@ -18,7 +18,7 @@
},
"autoload": {
"psr-4": {
"elitedivision\\amos\\comments\\": "src"
"arter\\amos\\comments\\": "src"
}
}
}
\ No newline at end of file
<?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
* Emilia Romagna Open Innovation
* Arter
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package elitedivision\amos\comments
* @package arter\amos\comments
* @category CategoryName
* @author Lombardia Informatica S.p.A.
*/
namespace elitedivision\amos\comments;
namespace arter\amos\comments;
use elitedivision\amos\comments\components\CommentComponent;
use elitedivision\amos\comments\models\Comment;
use elitedivision\amos\comments\models\CommentReply;
use elitedivision\amos\core\components\AmosView;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\module\ModuleInterface;
use elitedivision\amos\core\record\Record;
use arter\amos\comments\components\CommentComponent;
use arter\amos\comments\models\Comment;
use arter\amos\comments\models\CommentReply;
use arter\amos\core\components\AmosView;
use arter\amos\core\module\AmosModule;
use arter\amos\core\module\ModuleInterface;
use arter\amos\core\record\Record;
use yii\base\BootstrapInterface;
use yii\base\Event;
use yii\db\ActiveRecord;
......@@ -28,7 +24,7 @@ use yii\helpers\VarDumper;
/**
* Class AmosComments
* @package elitedivision\amos\comments
* @package arter\amos\comments
*/
class AmosComments extends AmosModule implements ModuleInterface, BootstrapInterface
{
......@@ -44,7 +40,7 @@ class AmosComments extends AmosModule implements ModuleInterface, BootstrapInter
/**
* @inheritdoc
*/
public $controllerNamespace = 'elitedivision\amos\comments\controllers';
public $controllerNamespace = 'arter\amos\comments\controllers';
public $newFileMode = 0666;
public $name = 'Comments';
public $layoutInverted = false;
......@@ -63,51 +59,51 @@ class AmosComments extends AmosModule implements ModuleInterface, BootstrapInter
/**
* This is the html used to render the subject of the e-mail. In the view is available the variable $profile
* that is an instance of 'elitedivision\amos\admin\models\UserProfile'
* that is an instance of 'arter\amos\admin\models\UserProfile'
* @var string
*/
public $htmlMailContentSubject = '@vendor/elitedivision/amos-comments/src/views/comment/email/content_subject';
public $htmlMailContentSubject = '@vendor/arter/amos-comments/src/views/comment/email/content_subject';
// public $htmlMailContentTitle = [
// 'elitedivision\amos\news\models\News' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_subject_news',
// 'elitedivision\amos\discussioni\models\DiscussioniTopic' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_subject_discussioni',
// 'elitedivision\amos\documenti\models\Documenti' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_subjcet_documenti'
// 'arter\amos\news\models\News' => '@vendor/arter/amos-comments/src/views/comment/email/content_subject_news',
// 'arter\amos\discussioni\models\DiscussioniTopic' => '@vendor/arter/amos-comments/src/views/comment/email/content_subject_discussioni',
// 'arter\amos\documenti\models\Documenti' => '@vendor/arter/amos-comments/src/views/comment/email/content_subjcet_documenti'
// ];
public $htmlMailContentSubjectDefault = '@vendor/elitedivision/amos-comments/src/views/comment/email/content_subject';
public $htmlMailContentSubjectDefault = '@vendor/arter/amos-comments/src/views/comment/email/content_subject';
/**
* This is the html used to render the subject of the e-mail. In the view is available the variable $profile
* that is an instance of 'elitedivision\amos\admin\models\UserProfile'
* that is an instance of 'arter\amos\admin\models\UserProfile'
* @var string
*/
public $htmlMailContentTitle = '@vendor/elitedivision/amos-comments/src/views/comment/email/content_title';
public $htmlMailContentTitle = '@vendor/arter/amos-comments/src/views/comment/email/content_title';
// public $htmlMailContentTitle = [
// 'elitedivision\amos\news\models\News' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_title_news',
// 'elitedivision\amos\discussioni\models\DiscussioniTopic' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_title_discussioni',
// 'elitedivision\amos\documenti\models\Documenti' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_title_documenti'
// 'arter\amos\news\models\News' => '@vendor/arter/amos-comments/src/views/comment/email/content_title_news',
// 'arter\amos\discussioni\models\DiscussioniTopic' => '@vendor/arter/amos-comments/src/views/comment/email/content_title_discussioni',
// 'arter\amos\documenti\models\Documenti' => '@vendor/arter/amos-comments/src/views/comment/email/content_title_documenti'
// ];
/*
*
*/
public $htmlMailContentTitleDefault = '@vendor/elitedivision/amos-comments/src/views/comment/email/content_title';
public $htmlMailContentTitleDefault = '@vendor/arter/amos-comments/src/views/comment/email/content_title';
/**
* This is the html used to render the message of the e-mail. In the view is available the variable $profile
* that is an instance of 'elitedivision\amos\admin\models\UserProfile'
* that is an instance of 'arter\amos\admin\models\UserProfile'
* @var string|array
*/
public $htmlMailContent = '@vendor/elitedivision/amos-comments/src/views/comment/email/content';
public $htmlMailContent = '@vendor/arter/amos-comments/src/views/comment/email/content';
// public $htmlMailContent = [
// 'elitedivision\amos\news\models\News' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_news',
// 'elitedivision\amos\discussioni\models\DiscussioniTopic' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_discussioni',
// 'elitedivision\amos\documenti\models\Documenti' => '@vendor/elitedivision/amos-comments/src/views/comment/email/content_documenti'
// 'arter\amos\news\models\News' => '@vendor/arter/amos-comments/src/views/comment/email/content_news',
// 'arter\amos\discussioni\models\DiscussioniTopic' => '@vendor/arter/amos-comments/src/views/comment/email/content_discussioni',
// 'arter\amos\documenti\models\Documenti' => '@vendor/arter/amos-comments/src/views/comment/email/content_documenti'
// ];
/*
*
*/
public $htmlMailContentDefault = '@vendor/elitedivision/amos-comments/src/views/comment/email/content';
public $htmlMailContentDefault = '@vendor/arter/amos-comments/src/views/comment/email/content';
/**
* Sets if the notify checkbox must be visible into the comments accordion
* @var bool
......@@ -148,9 +144,9 @@ class AmosComments extends AmosModule implements ModuleInterface, BootstrapInter
/**
* Example:
* [
* 'elitedivision\amos\documenti\models\Documenti',
* 'elitedivision\amos\news\models\News',
* 'elitedivision\amos\discussioni\models\Discussioni',
* 'arter\amos\documenti\models\Documenti',
* 'arter\amos\news\models\News',
* 'arter\amos\discussioni\models\Discussioni',
* ]
*
* @var boolean
......@@ -171,7 +167,7 @@ class AmosComments extends AmosModule implements ModuleInterface, BootstrapInter
public function init()
{
parent::init();
\Yii::setAlias('@elitedivision/amos/'.static::getModuleName().'/controllers', __DIR__.'/controllers/');
\Yii::setAlias('@arter/amos/'.static::getModuleName().'/controllers', __DIR__.'/controllers/');
// custom initialization code goes here
\Yii::configure($this, require(__DIR__.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php'));
}
......@@ -225,7 +221,7 @@ class AmosComments extends AmosModule implements ModuleInterface, BootstrapInter
->andWhere(['context' => $model->className(), 'context_id' => $model->id])
->groupBy('comment.id');
/** @var \elitedivision\amos\comments\models\Comment $lastComment */
/** @var \arter\amos\comments\models\Comment $lastComment */
$countComment = $query->count();
$query = Comment::find()
->joinWith('commentReplies', true, 'LEFT JOIN')
......
<?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
* Emilia Romagna Open Innovation
* Arter
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package elitedivision\amos\comments\assets
* @package arter\amos\comments\assets
* @category CategoryName
* @author Lombardia Informatica S.p.A.
*/
namespace elitedivision\amos\comments\assets;
namespace arter\amos\comments\assets;
use yii\web\AssetBundle;
/**
* Class CommentsAsset
* @package elitedivision\amos\comments\assets
* @package arter\amos\comments\assets
*/
class CommentsAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public $sourcePath = '@vendor/elitedivision/amos-comments/src/assets/web';
public $sourcePath = '@vendor/arter/amos-comments/src/assets/web';
/**
* @inheritdoc
......@@ -53,9 +49,9 @@ class CommentsAsset 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
}
......
<?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
* Emilia Romagna Open Innovation
* Arter
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package elitedivision\amos\comments\assets
* @package arter\amos\comments\assets
* @category CategoryName
* @author Lombardia Informatica S.p.A.
*/
namespace elitedivision\amos\comments\assets;
namespace arter\amos\comments\assets;
use yii\web\AssetBundle;
/**
* Class CommentsAsset
* @package elitedivision\amos\comments\assets
* @package arter\amos\comments\assets
*/
class CommentsBootstrapitaliaAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public $sourcePath = '@vendor/elitedivision/amos-comments/src/assets/web';
public $sourcePath = '@vendor/arter/amos-comments/src/assets/web';
/**
* @inheritdoc
......
/**
IMPORT AMOS-LAYOUT VARIABLES
*/
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/variables.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/utility.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/variables.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/utility.less";
/**
IMPORT STYLE-CUSTOM
*/
......
<?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
* Emilia Romagna Open Innovation
* Arter
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package elitedivision\amos\comments\base
* @package arter\amos\comments\base
* @category CategoryName
* @author Lombardia Informatica S.p.A.
*/
namespace elitedivision\amos\comments\base;
use elitedivision\amos\comments\AmosComments;
use elitedivision\amos\comments\models\Comment;
use elitedivision\amos\comments\models\CommentNotification;
use elitedivision\amos\comments\models\CommentReply;
use elitedivision\amos\comments\utility\CommentsUtility;
use elitedivision\amos\core\controllers\CrudController;
use elitedivision\amos\core\interfaces\ModelLabelsInterface;
use elitedivision\amos\core\record\Record;
use elitedivision\amos\core\user\User;
use elitedivision\amos\core\utilities\Email;
namespace arter\amos\comments\base;
use arter\amos\comments\AmosComments;
use arter\amos\comments\models\Comment;
use arter\amos\comments\models\CommentNotification;
use arter\amos\comments\models\CommentReply;
use arter\amos\comments\utility\CommentsUtility;
use arter\amos\core\controllers\CrudController;
use arter\amos\core\interfaces\ModelLabelsInterface;
use arter\amos\core\record\Record;
use arter\amos\core\user\User;
use arter\amos\core\utilities\Email;
use Yii;
use yii\base\BaseObject;
use yii\helpers\ArrayHelper;
use elitedivision\amos\comments\models\CommentNotificationUsers;
use elitedivision\amos\admin\models\UserProfile;
use arter\amos\comments\models\CommentNotificationUsers;
use arter\amos\admin\models\UserProfile;
use yii\helpers\VarDumper;
/**
* Class PartecipantsNotification
* @package elitedivision\amos\comments\base
* @package arter\amos\comments\base
*/
class PartecipantsNotification extends BaseObject
{
......@@ -72,9 +68,9 @@ class PartecipantsNotification extends BaseObject
$model_reply = $comment;
}
/** @var \elitedivision\amos\core\record\Record $contextModelClassName */
/** @var \arter\amos\core\record\Record $contextModelClassName */
$contextModelClassName = $model->context;
/** @var \elitedivision\amos\core\record\Record $contextModel */
/** @var \arter\amos\core\record\Record $contextModel */
$contextModel = $contextModelClassName::findOne($model->context_id);
$users = $this->getRecipients($contextModel, $contextModelClassName);
......@@ -105,7 +101,7 @@ class PartecipantsNotification extends BaseObject
* notify_tagging_user_in_content = 0
*
* @param array | custom type list | $users
* @param model | elitedivision\amos\comments\models\base\Comment | $comment
* @param model | arter\amos\comments\models\base\Comment | $comment
*
* @return array | custom type list | $users
*/
......@@ -173,8 +169,8 @@ class PartecipantsNotification extends BaseObject
$users = [];
// If the context is discussion, the emails must be sent to the participants in the scope.
if (Yii::$app->hasModule('discussioni') && ($contextModel instanceof \elitedivision\amos\discussioni\models\DiscussioniTopic)) {
/** @var \elitedivision\amos\discussioni\AmosDiscussioni $moduleDiscussioni */
if (Yii::$app->hasModule('discussioni') && ($contextModel instanceof \arter\amos\discussioni\models\DiscussioniTopic)) {
/** @var \arter\amos\discussioni\AmosDiscussioni $moduleDiscussioni */
$moduleDiscussioni = Yii::$app->getModule('discussioni');
$session = \Yii::$app->session;
$moduleCwh = \Yii::$app->getModule('cwh');
......@@ -182,8 +178,8 @@ class PartecipantsNotification extends BaseObject
if (!empty(\Yii::$app->params['isPoi']) && \Yii::$app->params['isPoi'] == true && !empty($scope) && !empty($scope['community'])
&& $scope['community'] == 2750) {
$communityManager = \elitedivision\amos\community\models\CommunityUserMm::find()->andWhere(['community_id' => 2750])->andWhere([
'role' => \elitedivision\amos\community\models\Community::ROLE_COMMUNITY_MANAGER]);
$communityManager = \arter\amos\community\models\CommunityUserMm::find()->andWhere(['community_id' => 2750])->andWhere([
'role' => \arter\amos\community\models\Community::ROLE_COMMUNITY_MANAGER]);
foreach ($communityManager->all() as $idComm) {
$user = User::findOne($idComm->user_id);
if (!is_null($user)) {
......@@ -194,15 +190,15 @@ class PartecipantsNotification extends BaseObject
if ($moduleDiscussioni->hasProperty('notifyOnlyContributors') && !$moduleDiscussioni->notifyOnlyContributors) {
$moduleCwh = Yii::$app->getModule('cwh');
if (!is_null($moduleCwh)) {
/** @var \elitedivision\amos\cwh\AmosCwh $moduleCwh */
if (in_array(\elitedivision\amos\discussioni\models\DiscussioniTopic::className(),
/** @var \arter\amos\cwh\AmosCwh $moduleCwh */
if (in_array(\arter\amos\discussioni\models\DiscussioniTopic::className(),
$moduleCwh->modelsEnabled)) {
$cwhActiveQuery = new \elitedivision\amos\cwh\query\CwhActiveQuery(\elitedivision\amos\discussioni\models\DiscussioniTopic::className());
$cwhActiveQuery = new \arter\amos\cwh\query\CwhActiveQuery(\arter\amos\discussioni\models\DiscussioniTopic::className());
if (in_array($contextModel->regola_pubblicazione,
\elitedivision\amos\cwh\utility\CwhUtil::getNetworkCwhRuleIds())) {
\arter\amos\cwh\utility\CwhUtil::getNetworkCwhRuleIds())) {
$queryUsers = $cwhActiveQuery->getRecipients($contextModel->regola_pubblicazione,
$contextModel->tagValues, $contextModel->destinatari);
$queryUsers->andWhere(['<>', \elitedivision\amos\core\user\User::tableName().'.id', Yii::$app->user->id]); // Exclude logged user id
$queryUsers->andWhere(['<>', \arter\amos\core\user\User::tableName().'.id', Yii::$app->user->id]); // Exclude logged user id
$users = ArrayHelper::map($queryUsers->all(), 'id', 'id');
}
}
......@@ -261,8 +257,8 @@ class PartecipantsNotification extends BaseObject
$user = User::findOne($id);
if (!empty($moduleNotify)) {
/** @var $notificationConf \elitedivision\amos\notificationmanager\models\NotificationConf */
$notificationConf = \elitedivision\amos\notificationmanager\models\NotificationConf::find()
/** @var $notificationConf \arter\amos\notificationmanager\models\NotificationConf */
$notificationConf = \arter\amos\notificationmanager\models\NotificationConf::find()
->andWhere(['user_id' => $id])
->one();
if ($notificationConf->hasProperty('notifications_enabled') && ($notificationConf->notify_comments == 0
......
<?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
* Emilia Romagna Open Innovation
* Arter
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package elitedivision\amos\comments\components
* @package arter\amos\comments\components
* @category CategoryName
* @author Lombardia Informatica S.p.A.
*/
namespace elitedivision\amos\comments\components;
namespace arter\amos\comments\components;
use elitedivision\amos\comments\AmosComments;
use elitedivision\amos\comments\models\CommentInterface;
use elitedivision\amos\comments\utility\CommentsUtility;
use elitedivision\amos\comments\widgets\CommentsWidget;
use elitedivision\amos\core\record\Record;
use arter\amos\comments\AmosComments;
use arter\amos\comments\models\CommentInterface;
use arter\amos\comments\utility\CommentsUtility;
use arter\amos\comments\widgets\CommentsWidget;
use arter\amos\core\record\Record;
use Yii;
use yii\base\Component;
use yii\base\Event;
......@@ -26,7 +22,7 @@ use yii\helpers\VarDumper;
/**
* Class CommentComponent
* @package elitedivision\amos\events\components
* @package arter\amos\events\components
*/
class CommentComponent extends Component implements CommentComponentInterface
{
......@@ -38,7 +34,7 @@ class CommentComponent extends Component implements CommentComponentInterface
public function showComments(Event $event)
{
if (isset(Yii::$app->controller->model)) {
/** @var \elitedivision\amos\core\record\Record $controllerModel */
/** @var \arter\amos\core\record\Record $controllerModel */
$controllerModel = Yii::$app->controller->model;
if ($this->checkDisableAutoDisplay($controllerModel) && $this->checkCommentsModuleEnabled($controllerModel) && $this->checkCommentsEnabledOnModel($controllerModel)) {
echo CommentsWidget::widget([
......@@ -51,7 +47,7 @@ class CommentComponent extends Component implements CommentComponentInterface
/**
* The method checks if the comment module is present and the actual controller
* model class name is present in the comments module configurations.
* @param \elitedivision\amos\core\record\Record $controllerModel
* @param \arter\amos\core\record\Record $controllerModel
* @return bool
*/
protected function checkCommentsModuleEnabled($controllerModel)
......@@ -68,7 +64,7 @@ class CommentComponent extends Component implements CommentComponentInterface
/**
* Method that checks if the controller model is an instance of CommentInterface
* and then if the model is commentable.
* @param \elitedivision\amos\core\record\Record $controllerModel
* @param \arter\amos\core\record\Record $controllerModel
* @return bool
*/
protected function checkCommentsEnabledOnModel($controllerModel)
......
<?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
* Emilia Romagna Open Innovation
* Arter
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package elitedivision\amos\comments\components
* @package arter\amos\comments\components
* @category CategoryName
* @author Lombardia Informatica S.p.A.
*/
namespace elitedivision\amos\comments\components;
namespace arter\amos\comments\components;
use yii\base\Event;
/**
* Interface CommentComponentInterface
* @package elitedivision\amos\comments\components
* @package arter\amos\comments\components
*/
interface CommentComponentInterface
{
......
<?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
* Emilia Romagna Open Innovation
* Arter
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package elitedivision\amos\comments\config
* @package arter\amos\comments\config
* @category CategoryName
* @author Lombardia Informatica S.p.A.
*/
return [
......