コード例 #1
0
ファイル: Authorization.php プロジェクト: quetzyg/control
 /**
  * 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');
 }
コード例 #2
0
ファイル: venue.php プロジェクト: blupl/sponsor
 /**
  * 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');
 }
コード例 #3
0
ファイル: Media.php プロジェクト: blupl/printmedia
 /**
  * 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');
 }
コード例 #4
0
 /**
  * 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;
 }
コード例 #5
0
 /**
  * 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);
     }
 }
コード例 #6
0
ファイル: AssembleCommand.php プロジェクト: azraai/foundation
 /**
  * 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();
 }
コード例 #7
0
ファイル: Can.php プロジェクト: stevebauman/foundation
 /**
  * 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));
 }
コード例 #8
0
 /**
  * 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.
     }
 }
コード例 #9
0
ファイル: Theme.php プロジェクト: quetzyg/control
 /**
  * Setup a new processor.
  *
  * @param  \Orchestra\Contracts\Foundation\Foundation  $foundation
  */
 public function __construct(Foundation $foundation)
 {
     $this->foundation = $foundation;
     $this->memory = $foundation->memory();
 }
コード例 #10
0
ファイル: Approral.php プロジェクト: blupl/printmedia
 /**
  * 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');
 }