Esempio n. 1
0
 public function localize()
 {
     if ($this->field === TableConst::COLUMN_ACTIONS) {
         return Language::get('table.' . TableConst::COLUMN_ACTIONS);
     }
     return Language::get(Platform::getModule() . '.table.' . $this->field);
 }
Esempio n. 2
0
 public function localize()
 {
     if ($this->slug === Form::MAIN) {
         return Language::get('ui.main_panel');
     } else {
         return Language::get(Platform::getModule() . '.panels.' . $this->slug);
     }
 }
Esempio n. 3
0
 private function set($column, $sort, $module = null)
 {
     $this->column = $column;
     $this->sort = $sort;
     if ($module) {
         $this->module = $module;
     } else {
         $this->module = Platform::getModule();
     }
 }
Esempio n. 4
0
 public function url()
 {
     if (isset($this->options['url'])) {
         return $this->options['url'];
     }
     $id = array_key_exists('id', $this->options) ? $this->options['id'] : null;
     $queryString = array_key_exists('queryString', $this->options) ? $this->options['queryString'] : null;
     $url = URL::route('module', array(Platform::getModule(), $this->type, $id));
     if (count($queryString)) {
         $url .= '?' . http_build_query($queryString);
     }
     return $url;
 }
Esempio n. 5
0
<?php

/*
 |--------------------------------------------------------------------------
 | Application Response Macros
 |--------------------------------------------------------------------------
*/
use Spescina\PlatformCore\Components\Action\Action as ActionConst;
use Spescina\PlatformCore\Facades\Platform;
Response::macro('showForm', function ($objId = null, $withInput = false) {
    $response = Redirect::route('module', array(Platform::getModule(), ActionConst::ACTION_SHOWFORM, $objId));
    if ($withInput) {
        $response->withInput();
    }
    return $response;
});
Response::macro('listing', function () {
    return Redirect::route('module', array(Platform::getModule(), ActionConst::ACTION_LISTING));
});
Esempio n. 6
0
 public function localize($section)
 {
     return Language::get(Platform::getModule() . '.section.' . $section);
 }
Esempio n. 7
0
 public function localize($label)
 {
     $key = Platform::getModule() . '.form._labels_.' . $this->slug . '.' . $label;
     return Language::get($key);
 }
Esempio n. 8
0
 public function localize()
 {
     return Language::get(Platform::getModule() . '.form.' . $this->slug);
 }
Esempio n. 9
0
 public function applicable()
 {
     return $this->module === Platform::getModule();
 }
Esempio n. 10
0
 public function load()
 {
     $this->item('root');
     $this->item(Platform::getModule());
 }