예제 #1
0
 public function __construct($attributes, ContainerInterface $container)
 {
     parent::__construct($attributes);
     $this->container = $container;
     $datagridBuilder = $container->get('datagrid_builder');
     $this->datagrid = $datagridBuilder->create($container->get('file.datagrid'));
     $this->jsFunction = 'LoadFiles_' . $this->_id;
     $this->attributes['load_handler'] = 'xajax_' . $this->jsFunction;
     $this->container->get('xajax_manager')->registerFunction([$this->jsFunction, $this, 'doLoadFilesForDatagrid_' . $this->_id]);
 }
예제 #2
0
 /**
  * Constructor
  *
  * @param          array               $attributes Element options
  * @param AttributeRepositoryInterface $repository
  * @param XajaxManager                 $xajaxManager
  */
 public function __construct($attributes, AttributeRepositoryInterface $repository, XajaxManager $xajaxManager)
 {
     $this->repository = $repository;
     $this->xajaxManager = $xajaxManager;
     $attributes['attributes'] = $this->repository->getAttributeProductFull();
     $this->attributes['deleteAttributeFunction'] = $this->xajaxManager->registerFunction(['DeleteAttribute', $this, 'deleteAttribute']);
     $this->attributes['renameAttributeFunction'] = $this->xajaxManager->registerFunction(['RenameAttribute', $this, 'renameAttribute']);
     $this->attributes['renameValueFunction'] = $this->xajaxManager->registerFunction(['RenameValue', $this, 'renameValue']);
     parent::__construct($attributes);
 }