Commit 5aab6461 authored by waltermazza's avatar waltermazza
Browse files

Arter namespace

parent 59d6a788
...@@ -11,13 +11,13 @@ Installation ...@@ -11,13 +11,13 @@ Installation
Either run Either run
```bash ```bash
composer require elitedivision/amos-social-auth composer require arter/amos-social-auth
``` ```
or add or add
``` ```
"elitedivision/amos-social-auth": "~1.0" "arter/amos-social-auth": "~1.0"
``` ```
to the require section of your `composer.json` file. to the require section of your `composer.json` file.
...@@ -28,7 +28,7 @@ Installation ...@@ -28,7 +28,7 @@ Installation
<?php <?php
'modules' => [ 'modules' => [
'socialauth' => [ 'socialauth' => [
'class' => 'elitedivision\amos\socialauth\Module' 'class' => 'arter\amos\socialauth\Module'
], ],
], ],
``` ```
...@@ -36,7 +36,7 @@ Installation ...@@ -36,7 +36,7 @@ Installation
3. Apply migrations 3. Apply migrations
```bash ```bash
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-social-auth/src/migrations php yii migrate/up --migrationPath=@vendor/arter/amos-social-auth/src/migrations
``` ```
...@@ -49,7 +49,7 @@ Configuration ...@@ -49,7 +49,7 @@ Configuration
<?php <?php
'modules' => [ 'modules' => [
'socialauth' => [ 'socialauth' => [
'class' => 'elitedivision\amos\socialauth\Module', 'class' => 'arter\amos\socialauth\Module',
'enableLogin' => true, 'enableLogin' => true,
'enableLink' => false, 'enableLink' => false,
'enableRegister' => false, 'enableRegister' => false,
...@@ -98,7 +98,7 @@ To enable social links check in admin configuraion the visibility for box social ...@@ -98,7 +98,7 @@ To enable social links check in admin configuraion the visibility for box social
```php ```php
$modules['admin'] = [ $modules['admin'] = [
'class' => 'elitedivision\amos\admin\AmosAdmin', 'class' => 'arter\amos\admin\AmosAdmin',
'enableRegister' => true, 'enableRegister' => true,
'fieldsConfigurations' => [ 'fieldsConfigurations' => [
'boxes' => [ 'boxes' => [
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"social", "social",
"yii2" "yii2"
], ],
"homepage": "https://bitbucket.org/elite_division/amos-social-auth", "homepage": "https://bitbucket.org/arter/amos-social-auth",
"type": "component", "type": "component",
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"elitedivision\\amos\\socialauth\\": "src" "arter\\amos\\socialauth\\": "src"
} }
} }
} }
\ No newline at end of file
...@@ -5,24 +5,24 @@ ...@@ -5,24 +5,24 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
namespace elitedivision\amos\socialauth; namespace arter\amos\socialauth;
use elitedivision\amos\admin\AmosAdmin; use arter\amos\admin\AmosAdmin;
use elitedivision\amos\core\module\AmosModule; use arter\amos\core\module\AmosModule;
use elitedivision\amos\socialauth\controllers\ShibbolethController; use arter\amos\socialauth\controllers\ShibbolethController;
use elitedivision\amos\socialauth\models\SocialAuthServices; use arter\amos\socialauth\models\SocialAuthServices;
use Yii; use Yii;
use yii\base\BootstrapInterface; use yii\base\BootstrapInterface;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
/** /**
* Class Module * Class Module
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
*/ */
class Module extends AmosModule implements BootstrapInterface class Module extends AmosModule implements BootstrapInterface
{ {
...@@ -83,7 +83,7 @@ class Module extends AmosModule implements BootstrapInterface ...@@ -83,7 +83,7 @@ class Module extends AmosModule implements BootstrapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public $controllerNamespace = 'elitedivision\amos\socialauth\controllers'; public $controllerNamespace = 'arter\amos\socialauth\controllers';
public $timeout = 180; public $timeout = 180;
...@@ -98,7 +98,7 @@ class Module extends AmosModule implements BootstrapInterface ...@@ -98,7 +98,7 @@ class Module extends AmosModule implements BootstrapInterface
public function init() public function init()
{ {
parent::init(); // TODO: Change the autogenerated stub parent::init(); // TODO: Change the autogenerated stub
\Yii::setAlias('@elitedivision/amos/' . static::getModuleName() . '/controllers', __DIR__ . '/controllers'); \Yii::setAlias('@arter/amos/' . static::getModuleName() . '/controllers', __DIR__ . '/controllers');
//Configuration //Configuration
$config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'); $config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php');
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Component; use yii\base\Component;
use yii\base\Widget; use yii\base\Widget;
...@@ -22,7 +22,7 @@ use yii\helpers\Html; ...@@ -22,7 +22,7 @@ use yii\helpers\Html;
/** /**
* Class FileImport * Class FileImport
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialAuthBar extends Widget class SocialAuthBar extends Widget
{ {
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\models\SocialAuthUsers; use arter\amos\socialauth\models\SocialAuthUsers;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Component; use yii\base\Component;
use yii\base\Widget; use yii\base\Widget;
...@@ -23,7 +23,7 @@ use yii\helpers\Html; ...@@ -23,7 +23,7 @@ use yii\helpers\Html;
/** /**
* Class FileImport * Class FileImport
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialLinkBar extends Widget class SocialLinkBar extends Widget
{ {
......
...@@ -5,20 +5,20 @@ ...@@ -5,20 +5,20 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Widget; use yii\base\Widget;
/** /**
* Class SocialLinkTable * Class SocialLinkTable
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialLinkTable extends Widget class SocialLinkTable extends Widget
{ {
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Component; use yii\base\Component;
use yii\base\Widget; use yii\base\Widget;
...@@ -22,7 +22,7 @@ use yii\helpers\Html; ...@@ -22,7 +22,7 @@ use yii\helpers\Html;
/** /**
* Class FileImport * Class FileImport
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialSignUpBar extends Widget class SocialSignUpBar extends Widget
{ {
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
...@@ -44,7 +44,7 @@ use elitedivision\amos\core\icons\AmosIcons; ...@@ -44,7 +44,7 @@ use elitedivision\amos\core\icons\AmosIcons;
<button type="button" class="btn btn-social collega-social" data-type="<?= $lowCaseName ?>"> <button type="button" class="btn btn-social collega-social" data-type="<?= $lowCaseName ?>">
<span class="fa fa-<?= $lowCaseName ?>"></span> <span class="fa fa-<?= $lowCaseName ?>"></span>
<span> <span>
<?= \elitedivision\amos\socialauth\Module::t('amossocialauth', 'Collega il tuo profilo') ?> <?= \arter\amos\socialauth\Module::t('amossocialauth', 'Collega il tuo profilo') ?>
</span> </span>
</button> </button>
<?php endif; ?> <?php endif; ?>
...@@ -69,14 +69,14 @@ use elitedivision\amos\core\icons\AmosIcons; ...@@ -69,14 +69,14 @@ use elitedivision\amos\core\icons\AmosIcons;
</div> </div>
<div class="field-media"> <div class="field-media">
<label>Email</label> <label>Email</label>
<span>damian.gomez@elitedivision.it</span> <span>damian.gomez@arter.it</span>
</div> </div>
</div> </div>
</div> </div>
<?php else: ?> <?php else: ?>
<div class="validatore_container checkws"> <div class="validatore_container checkws">
<br> <br>
<?= \elitedivision\amos\socialauth\Module::t('amossocialauth', 'Nessun profilo collegato.') ?> <?= \arter\amos\socialauth\Module::t('amossocialauth', 'Nessun profilo collegato.') ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
......
...@@ -5,26 +5,26 @@ ...@@ -5,26 +5,26 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
namespace elitedivision\amos\socialauth\controllers; namespace arter\amos\socialauth\controllers;
use elitedivision\amos\admin\models\UserProfile; use arter\amos\admin\models\UserProfile;
use elitedivision\amos\core\controllers\BackendController; use arter\amos\core\controllers\BackendController;
use elitedivision\amos\core\user\User; use arter\amos\core\user\User;
use elitedivision\amos\socialauth\models\SocialIdmUser; use arter\amos\socialauth\models\SocialIdmUser;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use elitedivision\amos\socialauth\utility\SocialAuthUtility; use arter\amos\socialauth\utility\SocialAuthUtility;
use http\Exception\RuntimeException; use http\Exception\RuntimeException;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use Yii; use Yii;
/** /**
* Class ShibbolethController * Class ShibbolethController
* @package elitedivision\amos\socialauth\controllers * @package arter\amos\socialauth\controllers
*/ */
class ShibbolethController extends BackendController class ShibbolethController extends BackendController
{ {
...@@ -99,7 +99,7 @@ class ShibbolethController extends BackendController ...@@ -99,7 +99,7 @@ class ShibbolethController extends BackendController
$result = $this->tryIdmLink(false, true, false); $result = $this->tryIdmLink(false, true, false);
if(is_array($result) && isset($result['status'])) { if(is_array($result) && isset($result['status'])) {
$user = \elitedivision\amos\mobile\bridge\modules\v1\models\User::findOne(Yii::$app->user->id); $user = \arter\amos\mobile\bridge\modules\v1\models\User::findOne(Yii::$app->user->id);
$user->refreshAccessToken('', ''); $user->refreshAccessToken('', '');
return $this->redirect(['/socialauth/social-auth/land', 'token' => $user->getAccessToken()]); return $this->redirect(['/socialauth/social-auth/land', 'token' => $user->getAccessToken()]);
......
...@@ -5,21 +5,21 @@ ...@@ -5,21 +5,21 @@
* OPEN 2.0 * OPEN 2.0
* *
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Elite Division S.r.l. * @author Elite Division S.r.l.
*/ */
namespace elitedivision\amos\socialauth\controllers; namespace arter\amos\socialauth\controllers;
use elitedivision\amos\admin\AmosAdmin; use arter\amos\admin\AmosAdmin;
use elitedivision\amos\admin\models\UserProfile; use arter\amos\admin\models\UserProfile;
use elitedivision\amos\attachments\components\FileImport; use arter\amos\attachments\components\FileImport;
use elitedivision\amos\core\controllers\BackendController; use arter\amos\core\controllers\BackendController;
use elitedivision\amos\core\user\User; use arter\amos\core\user\User;
use elitedivision\amos\mobile\bridge\modules\v1\models\AccessTokens; use arter\amos\mobile\bridge\modules\v1\models\AccessTokens;
use elitedivision\amos\socialauth\models\SocialAuthUsers; use arter\amos\socialauth\models\SocialAuthUsers;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Exception; use yii\base\Exception;
use yii\filters\AccessControl; use yii\filters\AccessControl;
...@@ -27,7 +27,7 @@ use yii\helpers\Url; ...@@ -27,7 +27,7 @@ use yii\helpers\Url;
/** /**
* Class FileController * Class FileController
* @package elitedivision\amos\socialauth\controllers * @package arter\amos\socialauth\controllers
*/ */
class SocialAuthController extends BackendController class SocialAuthController extends BackendController
{ {
...@@ -311,7 +311,7 @@ class SocialAuthController extends BackendController ...@@ -311,7 +311,7 @@ class SocialAuthController extends BackendController
return $this->redirect(['/socialauth/social-auth/land', 'error' => true, 'errorMessage' => Yii::t('socialauth', 'Accesso Social Non Disponibile')]); return $this->redirect(['/socialauth/social-auth/land', 'error' => true, 'errorMessage' => Yii::t('socialauth', 'Accesso Social Non Disponibile')]);
} }
$q = \elitedivision\amos\mobile\bridge\modules\v1\models\User::find(); $q = \arter\amos\mobile\bridge\modules\v1\models\User::find();
$q->where(['email' => $userProfile->email]); $q->where(['email' => $userProfile->email]);
$q->orWhere(['username' => $userProfile->email]); $q->orWhere(['username' => $userProfile->email]);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* OPEN 2.0 * OPEN 2.0
*