public function __construct()
 {
     $app = App::getFacadeApplication();
     $this->supplierRepository = new SupplierRepository($app);
     $this->productRepository = new ProductRepository($app);
     $this->skuFactory = new SkuFactory();
 }
 public function container()
 {
     if (is_null($this->ioc)) {
         $this->ioc = App::getFacadeApplication();
     }
     return $this->ioc;
 }
Exemplo n.º 3
0
 public function children()
 {
     parent::children();
     list($orderCol, $orderDirection) = $this->page->getChildOrderingPolicy();
     $manager = App::getFacadeApplication()['boomcms.template.manager'];
     $templates = $manager->getValidTemplates();
     // Create the main view with the basic settings
     $v = view("{$this->viewPrefix}/children", ['default_child_template' => $this->page->getDefaultChildTemplateId(), 'templates' => $templates, 'child_order_column' => $orderCol, 'child_order_direction' => $orderDirection, 'allowAdvanced' => $this->allowAdvanced, 'page' => $this->page]);
     // If we're showing the advanced settings then set the neccessary variables.
     if ($this->allowAdvanced) {
         // Add the view for the advanced settings to the main view.
         $v->default_grandchild_template = $this->page->getGrandchildTemplateId() != 0 ? $this->page->getGrandchildTemplateId() : $this->page->getTemplateId();
     }
     return $v;
 }
Exemplo n.º 4
0
 /**
  * Constructor
  */
 function __construct()
 {
     $this->app = App::getFacadeApplication();
     $this->paths = (require SRC_PATH . '/bootstrap/paths.php');
     $appActions = $this->app['config']['view.view_actions'];
     $appFilters = $this->app['config']['view.view_filters'];
     $viewAct = $appActions ?: $this->defaultActions;
     $viewFil = $appFilters ?: $this->defaultFilters;
     /**
      * Add actions
      */
     foreach ((array) $viewAct as $action) {
         add_action($action, array($this, 'parse'));
     }
     /**
      * Add filters
      */
     foreach ((array) $viewFil as $filter) {
         add_filter($filter, array($this, 'parse'));
     }
 }
<?php

namespace Khill\Lavacharts\Laravel;

use Illuminate\Support\Facades\App;
$app = App::getFacadeApplication();
$blade = $app['view']->getEngineResolver()->resolve('blade')->getCompiler();
$charts = ['AreaChart', 'BarChart', 'CalendarChart', 'ColumnChart', 'ComboChart', 'DonutChart', 'GaugeChart', 'GeoChart', 'LineChart', 'PieChart', 'GoogleTable'];
$dashboards = ['Dashboard'];
$controls = ['Control', 'CategoryFilter', 'ChartRangeFilter', 'DateRangeFilter', 'NumberRangeFilter', 'StringFilter'];
/**
 * If the directive method exists, we're using Laravel 5
 */
if (method_exists($blade, 'directive')) {
    foreach ($charts as $chart) {
        $blade->directive(strtolower($chart), function ($expression) use($chart) {
            return '<?php echo Lava::renderChart' . $chart . $expression . '; ?>';
        });
    }
    foreach ($charts as $chart) {
        $blade->directive(strtolower($chart) . 'Wrapper', function ($expression) use($chart) {
            return '<?php echo Lava::renderChartWrapper' . $chart . $expression . '; ?>';
        });
    }
    foreach ($controls as $control) {
        $blade->directive(strtolower($control), function ($expression) use($control) {
            return '<?php echo Lava::renderControl' . $control . $expression . '; ?>';
        });
    }
    foreach ($dashboards as $dashboard) {
        $blade->directive(strtolower($dashboard), function ($expression) use($dashboard) {
 public function __construct()
 {
     $app = App::getFacadeApplication();
     $this->skuRepository = new SkuRepository($app);
     $this->variationRepository = new VariationRepository($app);
 }
Exemplo n.º 7
0
 /**
  * Initialise the IoC Service Container
  */
 protected function setupContainer()
 {
     // Only set the application on the Facade
     // if there is none yet set
     if (is_null(App::getFacadeApplication())) {
         App::setFacadeApplication(new Container());
     }
     $this->container = App::getFacadeApplication();
     $this->container->singleton('app', $this->container);
 }
 /**
  * @test
  *
  * @depends canDestroy
  */
 public function hasUnsetFacadeApplication()
 {
     $this->assertNull(App::getFacadeApplication(), 'Container / Application should be null');
 }
 * Plugin URI: http://brunobarros.com/
 * Description: A framework for WordPress developers.
 * Version: 1.0.0
 * Author: Bruno Barros
 * Author URI: http://www.brunobarros.com/
 * License: GPLv2
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       app-integration
 * Domain Path:       /languages
 */
// If this file is called directly, abort.
use Weloquent\Plugins\AppIntegration\Includes\AppIntegration;
use Illuminate\Support\Facades\App;
use Weloquent\Plugins\AppIntegration\Includes\ConfigurationsAutoLoader;
if (!defined('WPINC')) {
    die;
}
/**
 * The core plugin class that is used to define internationalization,
 * dashboard-specific hooks, and public-facing site hooks.
 */
//$plugin = new AppIntegration(App::getFacadeApplication());
//$plugin->run();
add_action('setup_theme', function () {
    /**
     * ----------------------------------------------------------------
     * Bootstrap auto loading theme scripts on app/autoload folder
     * ----------------------------------------------------------------
     */
    ConfigurationsAutoLoader::setApp(App::getFacadeApplication())->add();
});
Exemplo n.º 10
0
 public function init()
 {
     $this->app = App::getFacadeApplication();
     $this->router = $this->app->make('router');
     $this->routes = $this->router->getRoutes();
 }
Exemplo n.º 11
0
 public function getCurrentPath()
 {
     if (!$this->currentPath) {
         $this->currentPath = dirname(App::getFacadeApplication()->basePath());
     }
     return $this->currentPath;
 }
 private function _verifyIsDirectory($files)
 {
     $path = dirname(App::getFacadeApplication()->basePath()) . '/' . $this->argument('module');
     $exec = 'y';
     if ($files->isDirectory($path)) {
         $exec = $this->ask("Directory `{$this->argument('module')}` already exists, to continue? " . "This action will overwrite existing files! [Y,N]");
     }
     return strtolower($exec);
 }
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new static(App::getFacadeApplication());
     }
     return self::$instance;
 }