Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (39 sloc) 1.591 kB
[?php
/**
* <?php echo $this->getModuleName() ?> module configuration.
*
* @package ##PROJECT_NAME##
* @subpackage <?php echo $this->getModuleName()."\n" ?>
* @author ##AUTHOR_NAME##
*/
abstract class Base<?php echo ucfirst($this->getModuleName()) ?>GeneratorHelper extends sfModelGeneratorHelper
{
public function getUrlForAction($action)
{
return 'list' == $action ? '<?php echo $this->params['route_prefix'] ?>' : '<?php echo $this->params['route_prefix'] ?>_'.$action;
}
public function linkToMoveUp($object, $params)
{
if ($object->isFirst())
{
return '<li class="sf_admin_action_moveup disabled"><span>'.__($params['label'], array(), 'sf_admin').'</span></li>';
}
if (empty($params['action']))
{
$params['action'] = 'moveUp';
}
return '<li class="sf_admin_action_moveup">'.link_to(__($params['label'], array(), 'sf_admin'), '<?php echo $this->params['moduleName'] ?>/'.$params['action'].'?<?php echo $this->getPrimaryKeyUrlParams('$object', true); ?>).'</li>';
}
public function linkToMoveDown($object, $params)
{
if ($object->isLast())
{
return '<li class="sf_admin_action_movedown disabled"><span>'.__($params['label'], array(), 'sf_admin').'</span></li>';
}
if (empty($params['action']))
{
$params['action'] = 'moveDown';
}
return '<li class="sf_admin_action_movedown">'.link_to(__($params['label'], array(), 'sf_admin'), '<?php echo $this->params['moduleName'] ?>/'.$params['action'].'?<?php echo $this->getPrimaryKeyUrlParams('$object', true); ?>).'</li>';
}
}
Jump to Line
Something went wrong with that request. Please try again.