added social connection action

This commit is contained in:
Antonio Ramirez
2016-12-09 16:41:25 +01:00
parent f6dcb21205
commit 3fe09e3eb3
9 changed files with 400 additions and 155 deletions

View File

@ -12,20 +12,39 @@ class ProfileController extends Controller
{
protected $profileQuery;
/**
* ProfileController constructor.
*
* @param string $id
* @param Module $module
* @param ProfileQuery $profileQuery
* @param array $config
*/
public function __construct($id, Module $module, ProfileQuery $profileQuery, array $config)
{
$this->profileQuery = $profileQuery;
parent::__construct($id, $module, $config);
}
/**
* @inheritdoc
*/
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
['allow' => true, 'actions' => ['index'], 'roles' => ['@']],
['allow' => true, 'actions' => ['show'], 'roles' => ['?', '@']],
[
'allow' => true,
'actions' => ['index'],
'roles' => ['@']
],
[
'allow' => true,
'actions' => ['show'],
'roles' => ['?', '@']
],
],
],
];