| 1 |
lars |
1 |
[?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* <?php echo $this->getModuleName() ?> module configuration.
|
|
|
5 |
*
|
|
|
6 |
* @package ##PROJECT_NAME##
|
|
|
7 |
* @subpackage <?php echo $this->getModuleName()."\n" ?>
|
|
|
8 |
* @author ##AUTHOR_NAME##
|
|
|
9 |
* @version SVN: $Id: configuration.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
|
|
|
10 |
*/
|
|
|
11 |
abstract class Base<?php echo ucfirst($this->getModuleName()) ?>GeneratorConfiguration extends sfModelGeneratorConfiguration
|
|
|
12 |
{
|
|
|
13 |
<?php include dirname(__FILE__).'/actionsConfiguration.php' ?>
|
|
|
14 |
|
|
|
15 |
<?php include dirname(__FILE__).'/fieldsConfiguration.php' ?>
|
|
|
16 |
|
|
|
17 |
/**
|
|
|
18 |
* Gets the form class name.
|
|
|
19 |
*
|
|
|
20 |
* @return string The form class name
|
|
|
21 |
*/
|
|
|
22 |
public function getFormClass()
|
|
|
23 |
{
|
|
|
24 |
return '<?php echo isset($this->config['form']['class']) ? $this->config['form']['class'] : $this->getModelClass().'Form' ?>';
|
|
|
25 |
<?php unset($this->config['form']['class']) ?>
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
public function hasFilterForm()
|
|
|
29 |
{
|
|
|
30 |
return <?php echo !isset($this->config['filter']['class']) || false !== $this->config['filter']['class'] ? 'true' : 'false' ?>;
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
/**
|
|
|
34 |
* Gets the filter form class name
|
|
|
35 |
*
|
|
|
36 |
* @return string The filter form class name associated with this generator
|
|
|
37 |
*/
|
|
|
38 |
public function getFilterFormClass()
|
|
|
39 |
{
|
|
|
40 |
return '<?php echo isset($this->config['filter']['class']) && !in_array($this->config['filter']['class'], array(null, true, false), true) ? $this->config['filter']['class'] : $this->getModelClass().'FormFilter' ?>';
|
|
|
41 |
<?php unset($this->config['filter']['class']) ?>
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
<?php include dirname(__FILE__).'/paginationConfiguration.php' ?>
|
|
|
45 |
|
|
|
46 |
<?php include dirname(__FILE__).'/sortingConfiguration.php' ?>
|
|
|
47 |
|
|
|
48 |
public function getTableMethod()
|
|
|
49 |
{
|
|
|
50 |
return '<?php echo isset($this->config['list']['table_method']) ? $this->config['list']['table_method'] : null ?>';
|
|
|
51 |
<?php unset($this->config['list']['table_method']) ?>
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
public function getTableCountMethod()
|
|
|
55 |
{
|
|
|
56 |
return '<?php echo isset($this->config['list']['table_count_method']) ? $this->config['list']['table_count_method'] : null ?>';
|
|
|
57 |
<?php unset($this->config['list']['table_count_method']) ?>
|
|
|
58 |
}
|
|
|
59 |
}
|