/** * Setup a new processor. * * @param \Orchestra\Contracts\Foundation\Foundation $foundation * @param \Orchestra\Contracts\Authorization\Factory $acl */ public function __construct(Foundation $foundation, Factory $acl) { $this->foundation = $foundation; $this->memory = $foundation->memory(); $this->acl = $acl; $this->model = $foundation->make('orchestra.role'); }
/** * Setup a new processor instance. * */ public function __construct(FranchisesPresenter $presenter, Foundation $foundation) { $this->presenter = $presenter; // $this->validator = $validator; $this->foundation = $foundation; $this->model = $foundation->make('Blupl\\Franchises\\Model\\Franchise'); }
/** * Setup a new processor instance. * */ public function __construct(MediaPresenter $presenter, MediaValidator $validator, Foundation $foundation) { $this->presenter = $presenter; $this->validator = $validator; $this->foundation = $foundation; $this->model = $foundation->make('Blupl\\PrintMedia\\Model\\MediaOrganization'); }
/** * Build documentation URL. * * @param array $documentation * * @return array */ protected function buildDocumentationUrl(array $documentation) { $current = $this->request->segment(2); foreach ($documentation as $doc) { $code = $doc->getCode(); if ($code !== $current && $this->foundation->is('app::docs*')) { $doc->setURL(strtr($this->urlGenerator->current(), [$current => $code])); } } return $documentation; }
/** * Refresh application for Orchestra Platform. * * @return void */ protected function refreshApplication() { if (!$this->foundation->installed()) { return; } $extensions = $this->memory->get('extensions.active', []); foreach ($extensions as $extension => $config) { $options = ['name' => $extension, '--force' => true]; $this->call('extension:refresh', $options); $this->call('extension:update', $options); } }
/** * Refresh application for Orchestra Platform. * * @return void */ protected function refreshApplication() { if (!$this->foundation->installed()) { return; } $this->call('extension:detect', ['--quiet' => true]); $extensions = $this->memory->get('extensions.active', []); foreach ($extensions as $extension => $config) { $options = ['name' => $extension, '--force' => true]; $this->call('extension:refresh', $options); $this->call('extension:update', $options); } $this->foundation->make('orchestra.extension.provider')->writeFreshManifest(); }
/** * Response on authorized request. * * @param \Illuminate\Http\Request $request * * @return mixed */ protected function responseOnUnauthorized($request) { if ($request->ajax()) { return $this->response->make('Unauthorized', 401); } $type = $this->auth->guest() ? 'guest' : 'user'; $url = $this->config->get("orchestra/foundation::routes.{$type}"); return $this->response->redirectTo($this->foundation->handles($url)); }
/** * Refresh application for Orchestra Platform. * * @return void */ protected function refreshApplication() { if (!$this->foundation->installed()) { return; } $this->call('extension:detect', ['--quiet' => true]); $extensions = $this->memory->get('extensions.active', []); try { foreach ($extensions as $extension => $config) { $options = ['name' => $extension, '--force' => true]; $this->call('extension:refresh', $options); $this->call('extension:update', $options); } $this->laravel->make('orchestra.extension.provider')->writeFreshManifest(); } catch (PDOException $e) { // Skip if application is unable to make connection to the database. } }
/** * Setup a new processor. * * @param \Orchestra\Contracts\Foundation\Foundation $foundation */ public function __construct(Foundation $foundation) { $this->foundation = $foundation; $this->memory = $foundation->memory(); }
/** * Setup a new processor instance. * */ public function __construct(MediaPresenter $presenter, Foundation $foundation) { $this->presenter = $presenter; $this->foundation = $foundation; $this->model = $foundation->make('Blupl\\PrintMedia\\Model\\MediaReporter'); }