changed login icon by studio, started to craft the studio ui
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
namespace Drupal\edlp_studio\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Drupal\Core\Session\AccountInterface;
|
||||
use Drupal\User\UserDataInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
use Drupal\edlp_studio\Entity\Chutier;
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\edlp_studio\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Drupal\Core\Session\AccountInterface;
|
||||
use Drupal\User\UserDataInterface;
|
||||
|
||||
use Drupal\edlp_studio\Entity\Chutier;
|
||||
|
||||
|
||||
/**
|
||||
* Class StudioUIController.
|
||||
*/
|
||||
class StudioUIController extends ControllerBase {
|
||||
|
||||
protected $user;
|
||||
protected $userdata;
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
public function __construct(AccountInterface $account, UserDataInterface $userdata) {
|
||||
$this->user = $account;
|
||||
$this->userdata = $userdata;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function create(ContainerInterface $container) {
|
||||
// Instantiates this form class.
|
||||
return new static(
|
||||
// Load the service required to construct this class.
|
||||
$container->get('current_user'),
|
||||
$container->get('user.data')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Studioui.
|
||||
*
|
||||
* @return string
|
||||
* Return Hello string.
|
||||
*/
|
||||
public function StudioUI() {
|
||||
// get current user
|
||||
// done by DependencyInjection of AccountInterface
|
||||
dpm($this->user->id());
|
||||
|
||||
// get his docs in chutier
|
||||
$docs = Chutier::getUserChutiersContents($this->user->id());
|
||||
dpm($docs);
|
||||
|
||||
// TODO: add chutier theme, preprocess, twig template to studio module
|
||||
// TODO: build content renderable array
|
||||
|
||||
// TODO: get compositions
|
||||
// TODO: add compositions theme, preprocess, twig template to studio module
|
||||
// TODO: build content renderable array
|
||||
|
||||
// TODO: add studio theme, preprocess, twig template to studio module
|
||||
// TODO: build global studio renderable array
|
||||
|
||||
return [
|
||||
'#type' => 'markup',
|
||||
'#markup' => $this->t('Implement method: StudioUI')
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user