Esempio n. 1
0
 public function init()
 {
     parent::init();
     $this->infoblockSchema('shop', 'shop', '\\TAO\\Bundle\\Shop\\Infoblock\\Shop');
     if ($this->option('delete_product')) {
         $this->subscribeDelete($this->option('delete_status'));
     }
 }
Esempio n. 2
0
 /**
  * Добавляет бандл
  *
  * @param $name
  * @return mixed
  * @throws TAOBundleNotFoundException
  */
 public static function addBundle($name)
 {
     $bundle = \TAO\Bundle::findBundle($name);
     if ($bundle) {
         self::$bundles[$name] = $bundle;
         return $bundle;
     } else {
         throw new TAOBundleNotFoundException("Bundle {$name} not found");
     }
 }
Esempio n. 3
0
    unset($uri);
    unset($p);
    unset($m);
    include $_tao_path;
    die;
}
if (isset($GLOBALS['tao_urlrewrited'])) {
    die;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/local/vendor/techart/bitrix.tao/include/prolog_before.php';
$GLOBALS['tao_urlrewrited'] = true;
$uri = $_SERVER['REQUEST_URI'];
$script = $_SERVER['PHP_SELF'];
chdir($_SERVER['DOCUMENT_ROOT']);
\TAO\Urls::processVars();
$content = \TAO\Bundle::routeBundles();
if (is_string($content)) {
    if (is_string(\TAO::$layout)) {
        $prolog = $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_after.php";
        $epilog = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php";
        if (\TAO::$layout == 'admin') {
            $prolog = $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_admin.php";
            $epilog = $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin.php";
        }
        require $prolog;
        if (\TAO::$compositeContent) {
            $frame = \TAO::compositeFrame(\TAO::$compositeContent);
            $stub = trim(\TAO::$compositeStub);
            $stub = strlen($stub) > 0 ? $stub : \TAO::t('composite_loading');
            $frame->begin($stub);
        }