Пример #1
0
 public static function source($_model_token)
 {
     if (!(\Sequode\Application\Modules\Package\Modeler::exists($_model_token, 'token') && \Sequode\Application\Modules\Sequode\Modeler::exists(\Sequode\Application\Modules\Package\Modeler::model()->sequode_id, 'id') && (\Sequode\Application\Modules\Account\Authority::isOwner(\Sequode\Application\Modules\Package\Modeler::model()) || \Sequode\Application\Modules\Account\Authority::isSystemOwner()) && (\Sequode\Application\Modules\Account\Authority::isOwner(\Sequode\Application\Modules\Sequode\Modeler::model()) || \Sequode\Application\Modules\Account\Authority::isSystemOwner()))) {
         return;
     }
     header('Content-Type: text/plain', true);
     header('Content-Disposition: attachment; filename="' . \Sequode\Application\Modules\Package\Modeler::model()->name . '.class.php"');
     echo \Sequode\Application\Modules\Package\Operations::download();
 }
Пример #2
0
 public static function name($_model_id, $dom_id)
 {
     $module = static::$module;
     $modeler = $module::model()->modeler;
     if (!($modeler::exists($_model_id, 'id') && (\Sequode\Application\Modules\Account\Authority::isOwner($modeler::model()) || \Sequode\Application\Modules\Account\Authority::isSystemOwner()))) {
         return;
     }
     return DOMElementKitJS::placeForm(ModuleForm::render($module::$registry_key, __FUNCTION__), $dom_id);
 }
Пример #3
0
 public static function details($_model_id = 0, $dom_id = 'CardsContainer')
 {
     $module = static::$module;
     $modeler = $module::model()->modeler;
     if (!($modeler::exists($_model_id, 'id') && (\Sequode\Application\Modules\Account\Authority::isOwner($modeler::model()) || \Sequode\Application\Modules\Account\Authority::isSystemOwner()))) {
         return;
     }
     return CardKitJS::placeCard(ModuleCard::render($module::$registry_key, __FUNCTION__), $dom_id);
 }
Пример #4
0
 public static function delete($_model_id)
 {
     $module = static::$module;
     $modeler = $module::model()->modeler;
     $operations = $module::model()->operations;
     $xhr_cards = $module::model()->xhr->cards;
     if (!($modeler::exists($_model_id, 'id') && (\Sequode\Application\Modules\Account\Authority::isOwner($modeler::model()) || \Sequode\Application\Modules\Account\Authority::isSystemOwner()))) {
         return;
     }
     forward_static_call_array(array($operations, __FUNCTION__), array());
     $js = array();
     $js[] = forward_static_call_array(array($xhr_cards, 'my'), array());
     return implode(' ', $js);
 }