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

Arter namespace

parent 59d6a788
......@@ -11,13 +11,13 @@ Installation
Either run
```bash
composer require elitedivision/amos-social-auth
composer require arter/amos-social-auth
```
or add
```
"elitedivision/amos-social-auth": "~1.0"
"arter/amos-social-auth": "~1.0"
```
to the require section of your `composer.json` file.
......@@ -28,7 +28,7 @@ Installation
<?php
'modules' => [
'socialauth' => [
'class' => 'elitedivision\amos\socialauth\Module'
'class' => 'arter\amos\socialauth\Module'
],
],
```
......@@ -36,7 +36,7 @@ Installation
3. Apply migrations
```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
<?php
'modules' => [
'socialauth' => [
'class' => 'elitedivision\amos\socialauth\Module',
'class' => 'arter\amos\socialauth\Module',
'enableLogin' => true,
'enableLink' => false,
'enableRegister' => false,
......@@ -98,7 +98,7 @@ To enable social links check in admin configuraion the visibility for box social
```php
$modules['admin'] = [
'class' => 'elitedivision\amos\admin\AmosAdmin',
'class' => 'arter\amos\admin\AmosAdmin',
'enableRegister' => true,
'fieldsConfigurations' => [
'boxes' => [
......
......@@ -7,7 +7,7 @@
"social",
"yii2"
],
"homepage": "https://bitbucket.org/elite_division/amos-social-auth",
"homepage": "https://bitbucket.org/arter/amos-social-auth",
"type": "component",
"require": {
"php": ">=5.4.0",
......@@ -19,7 +19,7 @@
},
"autoload": {
"psr-4": {
"elitedivision\\amos\\socialauth\\": "src"
"arter\\amos\\socialauth\\": "src"
}
}
}
\ No newline at end of file
......@@ -5,24 +5,24 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\socialauth;
namespace arter\amos\socialauth;
use elitedivision\amos\admin\AmosAdmin;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\socialauth\controllers\ShibbolethController;
use elitedivision\amos\socialauth\models\SocialAuthServices;
use arter\amos\admin\AmosAdmin;
use arter\amos\core\module\AmosModule;
use arter\amos\socialauth\controllers\ShibbolethController;
use arter\amos\socialauth\models\SocialAuthServices;
use Yii;
use yii\base\BootstrapInterface;
use yii\helpers\ArrayHelper;
/**
* Class Module
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
*/
class Module extends AmosModule implements BootstrapInterface
{
......@@ -83,7 +83,7 @@ class Module extends AmosModule implements BootstrapInterface
/**
* @inheritdoc
*/
public $controllerNamespace = 'elitedivision\amos\socialauth\controllers';
public $controllerNamespace = 'arter\amos\socialauth\controllers';
public $timeout = 180;
......@@ -98,7 +98,7 @@ class Module extends AmosModule implements BootstrapInterface
public function init()
{
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
$config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php');
......
......@@ -5,15 +5,15 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\socialauth\components;
namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module;
use arter\amos\core\icons\AmosIcons;
use arter\amos\socialauth\Module;
use Yii;
use yii\base\Component;
use yii\base\Widget;
......@@ -22,7 +22,7 @@ use yii\helpers\Html;
/**
* Class FileImport
* @package elitedivision\amos\socialauth\components
* @package arter\amos\socialauth\components
*/
class SocialAuthBar extends Widget
{
......
......@@ -5,16 +5,16 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\socialauth\components;
namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\models\SocialAuthUsers;
use elitedivision\amos\socialauth\Module;
use arter\amos\core\icons\AmosIcons;
use arter\amos\socialauth\models\SocialAuthUsers;
use arter\amos\socialauth\Module;
use Yii;
use yii\base\Component;
use yii\base\Widget;
......@@ -23,7 +23,7 @@ use yii\helpers\Html;
/**
* Class FileImport
* @package elitedivision\amos\socialauth\components
* @package arter\amos\socialauth\components
*/
class SocialLinkBar extends Widget
{
......
......@@ -5,20 +5,20 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth\components
* @package arter\amos\socialauth\components
* @category CategoryName
* @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\base\Widget;
/**
* Class SocialLinkTable
* @package elitedivision\amos\socialauth\components
* @package arter\amos\socialauth\components
*/
class SocialLinkTable extends Widget
{
......
......@@ -5,15 +5,15 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\socialauth\components;
namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module;
use arter\amos\core\icons\AmosIcons;
use arter\amos\socialauth\Module;
use Yii;
use yii\base\Component;
use yii\base\Widget;
......@@ -22,7 +22,7 @@ use yii\helpers\Html;
/**
* Class FileImport
* @package elitedivision\amos\socialauth\components
* @package arter\amos\socialauth\components
*/
class SocialSignUpBar extends Widget
{
......
......@@ -5,13 +5,13 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons;
use arter\amos\core\icons\AmosIcons;
?>
<div class="social-auth-bar">
<?php
......
......@@ -5,14 +5,14 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module;
use arter\amos\core\icons\AmosIcons;
use arter\amos\socialauth\Module;
?>
<div class="social-auth-bar">
<?php
......
......@@ -5,13 +5,13 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons;
use arter\amos\core\icons\AmosIcons;
?>
<div class="social-auth-bar">
<?php
......@@ -44,7 +44,7 @@ use elitedivision\amos\core\icons\AmosIcons;
<button type="button" class="btn btn-social collega-social" data-type="<?= $lowCaseName ?>">
<span class="fa fa-<?= $lowCaseName ?>"></span>
<span>
<?= \elitedivision\amos\socialauth\Module::t('amossocialauth', 'Collega il tuo profilo') ?>
<?= \arter\amos\socialauth\Module::t('amossocialauth', 'Collega il tuo profilo') ?>
</span>
</button>
<?php endif; ?>
......@@ -69,14 +69,14 @@ use elitedivision\amos\core\icons\AmosIcons;
</div>
<div class="field-media">
<label>Email</label>
<span>damian.gomez@elitedivision.it</span>
<span>damian.gomez@arter.it</span>
</div>
</div>
</div>
<?php else: ?>
<div class="validatore_container checkws">
<br>
<?= \elitedivision\amos\socialauth\Module::t('amossocialauth', 'Nessun profilo collegato.') ?>
<?= \arter\amos\socialauth\Module::t('amossocialauth', 'Nessun profilo collegato.') ?>
</div>
<?php endif; ?>
</div>
......
......@@ -5,13 +5,13 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons;
use arter\amos\core\icons\AmosIcons;
?>
<div class="social-auth-bar">
<?php
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,26 +5,26 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\socialauth\controllers;
namespace arter\amos\socialauth\controllers;
use elitedivision\amos\admin\models\UserProfile;
use elitedivision\amos\core\controllers\BackendController;
use elitedivision\amos\core\user\User;
use elitedivision\amos\socialauth\models\SocialIdmUser;
use elitedivision\amos\socialauth\Module;
use elitedivision\amos\socialauth\utility\SocialAuthUtility;
use arter\amos\admin\models\UserProfile;
use arter\amos\core\controllers\BackendController;
use arter\amos\core\user\User;
use arter\amos\socialauth\models\SocialIdmUser;
use arter\amos\socialauth\Module;
use arter\amos\socialauth\utility\SocialAuthUtility;
use http\Exception\RuntimeException;
use yii\filters\AccessControl;
use Yii;
/**
* Class ShibbolethController
* @package elitedivision\amos\socialauth\controllers
* @package arter\amos\socialauth\controllers
*/
class ShibbolethController extends BackendController
{
......@@ -99,7 +99,7 @@ class ShibbolethController extends BackendController
$result = $this->tryIdmLink(false, true, false);
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('', '');
return $this->redirect(['/socialauth/social-auth/land', 'token' => $user->getAccessToken()]);
......
......@@ -5,21 +5,21 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth
* @package arter\amos\socialauth
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace elitedivision\amos\socialauth\controllers;
namespace arter\amos\socialauth\controllers;
use elitedivision\amos\admin\AmosAdmin;
use elitedivision\amos\admin\models\UserProfile;
use elitedivision\amos\attachments\components\FileImport;
use elitedivision\amos\core\controllers\BackendController;
use elitedivision\amos\core\user\User;
use elitedivision\amos\mobile\bridge\modules\v1\models\AccessTokens;
use elitedivision\amos\socialauth\models\SocialAuthUsers;
use elitedivision\amos\socialauth\Module;
use arter\amos\admin\AmosAdmin;
use arter\amos\admin\models\UserProfile;
use arter\amos\attachments\components\FileImport;
use arter\amos\core\controllers\BackendController;
use arter\amos\core\user\User;
use arter\amos\mobile\bridge\modules\v1\models\AccessTokens;
use arter\amos\socialauth\models\SocialAuthUsers;
use arter\amos\socialauth\Module;
use Yii;
use yii\base\Exception;
use yii\filters\AccessControl;
......@@ -27,7 +27,7 @@ use yii\helpers\Url;
/**
* Class FileController
* @package elitedivision\amos\socialauth\controllers
* @package arter\amos\socialauth\controllers
*/
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')]);
}
$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->orWhere(['username' => $userProfile->email]);
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth\i18n\en-GB
* @package arter\amos\socialauth\i18n\en-GB
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth\i18n\en-US
* @package arter\amos\socialauth\i18n\en-US
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,7 +5,7 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth\i18n\it-IT
* @package arter\amos\socialauth\i18n\it-IT
* @category CategoryName
* @author Elite Division S.r.l.
*/
......
......@@ -5,12 +5,12 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth\migrations
* @package arter\amos\socialauth\migrations
* @category CategoryName
* @author Elite Division S.r.l.
*/
use elitedivision\amos\core\migration\AmosMigrationTableCreation;
use arter\amos\core\migration\AmosMigrationTableCreation;
/**
* Class m170711_160734_create_table_social_users
......
......@@ -5,12 +5,12 @@
* OPEN 2.0
*
*
* @package elitedivision\amos\socialauth\migrations
* @package arter\amos\socialauth\migrations
* @category CategoryName
* @author Elite Division S.r.l.
*/
use elitedivision\amos\core\migration\AmosMigrationTableCreation;
use arter\amos\core\migration\AmosMigrationTableCreation;
/**
* Class m180622_143240_social_auth_create_social_user_services
......
......@@ -4,12 +4,12 @@
* Art-ER Attrattività, ricerca e territorio dell’Emilia-Romagna
* OPEN 2.0
*
* @package Open20Package
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
use elitedivision\amos\core\migration\AmosMigrationTableCreation;
use arter\amos\core\migration\AmosMigrationTableCreation;
/**
* Class m180920_103032_create_idm_table
......
Markdown is supported
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