Esempio n. 1
0
 public static function cloneSequence($sequode_model_id = 0)
 {
     if (!(\Sequode\Application\Modules\Account\Authority::canCreate() && \Sequode\Application\Modules\Sequode\Modeler::exists($sequode_model_id, 'id') && \Sequode\Application\Modules\Sequode\Authority::isSequence() && \Sequode\Application\Modules\Account\Authority::canCopy())) {
         return;
     }
     \Sequode\Application\Modules\Sequode\Operations::makeSequenceCopy(\Sequode\Application\Modules\Account\Modeler::model()->id);
     $object = (object) null;
     $object->Success = 1;
     $object->Model_Id = \Sequode\Application\Modules\Sequode\Modeler::model()->id;
     echo json_encode($object);
     exit;
 }
Esempio n. 2
0
 public static function newSequence()
 {
     $module = static::$module;
     $modeler = $module::model()->modeler;
     $operations = $module::model()->operations;
     $xhr_cards = $module::model()->xhr->cards;
     if (!\Sequode\Application\Modules\Account\Authority::canCreate()) {
         return;
     }
     forward_static_call_array(array($operations, __FUNCTION__), array(\Sequode\Application\Modules\Account\Modeler::model()->id));
     $js = array();
     $collection = 'sequodes';
     $js[] = DOMElementKitJS::fetchCollection($collection, $modeler::model()->id);
     $js[] = forward_static_call_array(array($xhr_cards, 'details'), array($modeler::model()->id));
     return implode(' ', $js);
 }