/** * Init the controller. * * Add an wordpress action to create the admin menu/submenu page */ public function init() { parent::init(); //init the admin menu if required \add_action('admin_menu', array($this, 'adminMenu'), 11); return $this; }
/** * @param ContainerInterface $container * @param AuthenticationManager $authentificationManager */ public function __construct(ContainerInterface $container, AuthenticationManager $authentificationManager) { parent::__construct($container); $this->authenticationManager = $authentificationManager; //define entry point url $listenerRequest = $this->container->getRoot()->get('listener.request_listener'); $this->entryPointUrl = $listenerRequest->getUrl('connect/login'); $this->logoutUrl = $listenerRequest->getUrl('connect/logout'); }
/** * Constructor * * @param ContainerInterface $container * @param LoginButtonManager $loginButtonManager */ public function __construct(ContainerInterface $container, LoginButtonManager $loginButtonManager) { parent::__construct($container); $this->loginButtonManager = $loginButtonManager; }