示例#1
0
 public function __construct(array $options = array())
 {
     if (!class_exists('ZipArchive')) {
         throw new Bvb_Grid_Exception('Class ZipArchive not available. Check www.php.net/ZipArchive for more information');
     }
     $this->_setRemoveHiddenFields(true);
     parent::__construct($options);
     $this->addTemplateDir('Bvb/Grid/Template/', 'Bvb_Grid_Template', 'wordx');
 }
示例#2
0
文件: Csv.php 项目: Aeryris/grid
 /**
  * Optimize performance by setting best value for $this->setPagination(?);
  *
  * Options (deploy.csv.<option>):
  * set_time_limit - time out for php script
  * memory_limit - PHP memory limit
  * download - send data directly to user
  * save - save data to file
  * fileName - filename used as suggestion when downloading and to save data
  * dir - directory where to store data
  *
  * @param array $options options
  * @see _prepareOptions
  * @return void
  */
 public function __construct(array $options = array())
 {
     $this->_setRemoveHiddenFields(true);
     parent::__construct($options);
     // fix configuration options
     $deploy = $this->getDeployOption($this->_deployName, array());
     $defaults = array('dir' => '', 'store' => false, 'download' => !isset($deploy['download']) && !isset($deploy['store']));
     $deploy = array_merge($defaults, $deploy);
     if (!empty($deploy['dir'])) {
         $deploy['dir'] = rtrim($deploy['dir'], "/") . "/";
     }
     // set the changed options
     $this->setDeployOption($this->_deployName, $deploy);
     // TODO I don't understand why parent::__constructor will not set this automaticaly,
     // what if it would be loaded from config ?
     $this->_deploy = $this->getDeployOption($this->_deployName);
     $this->checkExportRights();
 }
示例#3
0
文件: Excel.php 项目: robjacoby/xlr8u
 /**
  * Constructor
  *
  * @param array $options
  *
  * @return void
  */
 public function __construct($options)
 {
     $this->_setRemoveHiddenFields(true);
     parent::__construct($options);
     $this->checkExportRights();
 }
示例#4
0
 public function __construct(array $options = array())
 {
     $this->_setRemoveHiddenFields(true);
     parent::__construct($options);
 }
示例#5
0
 /**
  * Class construct
  *
  * @param array $options Config options to apply
  */
 public function __construct(array $options = array())
 {
     $this->_setRemoveHiddenFields(true);
     parent::__construct($options);
     if (isset($this->_options['grid']['id'])) {
         $this->setGridId($this->_options['grid']['id']);
     }
     $this->_gridSession = new Zend_Session_Namespace('Bvb_Grid_' . $this->getGridId());
     $this->addTemplateDir('Bvb/Grid/Template', 'Bvb_Grid_Template', 'table');
     if ($this->getParam('add') || $this->getParam('edit')) {
         if ($this->getParam('add')) {
             $this->_willShow[] = 'form';
             $this->_willShow[] = 'formAdd';
         }
         if ($this->getParam('edit')) {
             $this->_willShow[] = 'form';
             $this->_willShow[] = 'formEdit';
         }
     } else {
         if ($this->getParam('detail') || $this->getParam('delete')) {
             $this->_willShow[] = 'detail';
         } else {
             $this->_willShow[] = 'listing';
         }
     }
 }
示例#6
0
 public function __construct(array $options = array())
 {
     $this->_setRemoveHiddenFields(true);
     parent::__construct($options);
     $this->addTemplateDir('Bvb/Grid/Template', 'Bvb_Grid_Template', 'print');
 }
示例#7
0
文件: Ofc.php 项目: Aeryris/grid
 /**
  * @param array $data
  */
 public function __construct(array $options = array())
 {
     $this->options = $options;
     if (!Zend_Loader_Autoloader::autoload('OFC_Chart')) {
         die("You must have Open Flash Chart installed in order to use this deploy. Please check this page for more information: http://code.google.com/p/zfdatagrid/wiki/Bvb_Grid_Deploy");
     }
     parent::__construct($options);
 }
示例#8
0
文件: Table.php 项目: robjacoby/xlr8u
 /**
  * Class construct
  *
  * @param array $options Config options to apply
  */
 public function __construct($options)
 {
     $this->_setRemoveHiddenFields(true);
     parent::__construct($options);
     if (isset($this->_options['grid']['id'])) {
         $this->setGridId($this->_options['grid']['id']);
     }
     $this->_gridSession = new Zend_Session_Namespace('Bvb_Grid_' . $this->getGridId());
     $this->addTemplateDir('Bvb/Grid/Template', 'Bvb_Grid_Template', 'table');
     if ($this->getRequest()->isPost() && $this->getRequest()->getPost('postMassIds')) {
         $this->_redirect($this->getUrl());
         die;
     }
 }
示例#9
0
 /**
  * Constructor
  *
  * @param array $options configuration options
  */
 public function __construct($options = array())
 {
     $this->initLogger();
     parent::__construct($options);
     // TODO fix for property with same name in Bvb_Grid
     $this->_view = null;
     // prepare request parameters sent by jqGrid
     $this->removeAllParams();
     $this->convertRequestParams();
 }