Example #1
0
 /**
  * Sets the schema export Dia properties
  *
  * @return void
  */
 protected function setProperties()
 {
     $schemaPluginProperties = new SchemaPluginProperties();
     $schemaPluginProperties->setText('Dia');
     $schemaPluginProperties->setExtension('dia');
     $schemaPluginProperties->setMimeType('application/dia');
     // create the root group that will be the options field for
     // $schemaPluginProperties
     // this will be shown as "Format specific options"
     $exportSpecificOptions = new OptionsPropertyRootGroup();
     $exportSpecificOptions->setName("Format Specific Options");
     // specific options main group
     $specificOptions = new OptionsPropertyMainGroup();
     $specificOptions->setName("general_opts");
     // add options common to all plugins
     $this->addCommonOptions($specificOptions);
     $leaf = new SelectPropertyItem();
     $leaf->setName("orientation");
     $leaf->setText(__('Orientation'));
     $leaf->setValues(array('L' => __('Landscape'), 'P' => __('Portrait')));
     $specificOptions->addProperty($leaf);
     $leaf = new SelectPropertyItem();
     $leaf->setName("paper");
     $leaf->setText(__('Paper size'));
     $leaf->setValues($this->_getPaperSizeArray());
     $specificOptions->addProperty($leaf);
     // add the main group to the root group
     $exportSpecificOptions->addProperty($specificOptions);
     // set the options for the schema export plugin property item
     $schemaPluginProperties->setOptions($exportSpecificOptions);
     $this->properties = $schemaPluginProperties;
 }
Example #2
0
 /**
  * Sets the schema export EPS properties
  *
  * @return void
  */
 protected function setProperties()
 {
     $schemaPluginProperties = new SchemaPluginProperties();
     $schemaPluginProperties->setText('EPS');
     $schemaPluginProperties->setExtension('eps');
     $schemaPluginProperties->setMimeType('application/eps');
     // create the root group that will be the options field for
     // $schemaPluginProperties
     // this will be shown as "Format specific options"
     $exportSpecificOptions = new OptionsPropertyRootGroup("Format Specific Options");
     // specific options main group
     $specificOptions = new OptionsPropertyMainGroup("general_opts");
     // add options common to all plugins
     $this->addCommonOptions($specificOptions);
     // create leaf items and add them to the group
     $leaf = new BoolPropertyItem('all_tables_same_width', __('Same width for all tables'));
     $specificOptions->addProperty($leaf);
     $leaf = new SelectPropertyItem("orientation", __('Orientation'));
     $leaf->setValues(array('L' => __('Landscape'), 'P' => __('Portrait')));
     $specificOptions->addProperty($leaf);
     // add the main group to the root group
     $exportSpecificOptions->addProperty($specificOptions);
     // set the options for the schema export plugin property item
     $schemaPluginProperties->setOptions($exportSpecificOptions);
     $this->properties = $schemaPluginProperties;
 }
Example #3
0
 /**
  * Sets the schema export SVG properties
  *
  * @return void
  */
 protected function setProperties()
 {
     $schemaPluginProperties = new SchemaPluginProperties();
     $schemaPluginProperties->setText('SVG');
     $schemaPluginProperties->setExtension('svg');
     $schemaPluginProperties->setMimeType('application/svg');
     // create the root group that will be the options field for
     // $schemaPluginProperties
     // this will be shown as "Format specific options"
     $exportSpecificOptions = new OptionsPropertyRootGroup();
     $exportSpecificOptions->setName("Format Specific Options");
     // specific options main group
     $specificOptions = new OptionsPropertyMainGroup();
     $specificOptions->setName("general_opts");
     // add options common to all plugins
     $this->addCommonOptions($specificOptions);
     // create leaf items and add them to the group
     $leaf = new BoolPropertyItem();
     $leaf->setName('all_tables_same_width');
     $leaf->setText(__('Same width for all tables'));
     $specificOptions->addProperty($leaf);
     // add the main group to the root group
     $exportSpecificOptions->addProperty($specificOptions);
     // set the options for the schema export plugin property item
     $schemaPluginProperties->setOptions($exportSpecificOptions);
     $this->properties = $schemaPluginProperties;
 }
 /**
  * Sets the schema export PDF properties
  *
  * @return void
  */
 protected function setProperties()
 {
     $schemaPluginProperties = new SchemaPluginProperties();
     $schemaPluginProperties->setText('PDF');
     $schemaPluginProperties->setExtension('pdf');
     $schemaPluginProperties->setMimeType('application/pdf');
     // create the root group that will be the options field for
     // $schemaPluginProperties
     // this will be shown as "Format specific options"
     $exportSpecificOptions = new OptionsPropertyRootGroup();
     $exportSpecificOptions->setName("Format Specific Options");
     // specific options main group
     $specificOptions = new OptionsPropertyMainGroup();
     $specificOptions->setName("general_opts");
     // add options common to all plugins
     $this->addCommonOptions($specificOptions);
     // create leaf items and add them to the group
     $leaf = new BoolPropertyItem();
     $leaf->setName('all_tables_same_width');
     $leaf->setText(__('Same width for all tables'));
     $specificOptions->addProperty($leaf);
     $leaf = new SelectPropertyItem();
     $leaf->setName("orientation");
     $leaf->setText(__('Orientation'));
     $leaf->setValues(array('L' => __('Landscape'), 'P' => __('Portrait')));
     $specificOptions->addProperty($leaf);
     $leaf = new SelectPropertyItem();
     $leaf->setName("paper");
     $leaf->setText(__('Paper size'));
     $leaf->setValues($this->_getPaperSizeArray());
     $specificOptions->addProperty($leaf);
     $leaf = new BoolPropertyItem();
     $leaf->setName('show_grid');
     $leaf->setText(__('Show grid'));
     $specificOptions->addProperty($leaf);
     $leaf = new BoolPropertyItem();
     $leaf->setName('with_doc');
     $leaf->setText(__('Data dictionary'));
     $specificOptions->addProperty($leaf);
     $leaf = new SelectPropertyItem();
     $leaf->setName("table_order");
     $leaf->setText(__('Order of the tables'));
     $leaf->setValues(array('' => __('None'), 'name_asc' => __('Name (Ascending)'), 'name_desc' => __('Name (Descending)')));
     $specificOptions->addProperty($leaf);
     // add the main group to the root group
     $exportSpecificOptions->addProperty($specificOptions);
     // set the options for the schema export plugin property item
     $schemaPluginProperties->setOptions($exportSpecificOptions);
     $this->properties = $schemaPluginProperties;
 }