/** * Create a new action button. * @param action The method to call when the button is clicked * @param title The label on the button * @param image The default image to display * @param hoverImage The image to display on hover * @param form The parent form, auto-set when the field is placed inside a form */ function __construct($action, $title = "", $image = "", $hoverImage = null, $className = null, $form = null) { $this->image = $image; $this->hoverImage = $hoverImage; $this->className = $className; parent::__construct($action, $title, $form); }
function __construct($link = "", $title = "", $form = null, $extraData = null, $extraClass = 'roundedButton') { if (!$title) { $title = _t('CancelFormAction.CANCEL', 'Cancel'); } $this->setLink($link); parent::__construct('CancelFormAction', $title, $form, $extraData, $extraClass); }
/** * Create a new action button. * * @param action The method to call when the button is clicked * @param title The label on the button * @param form The parent form, auto-set when the field is placed inside a form */ public function __construct($title = null) { $this->action = "action_modalToggle"; parent::__construct($this->action, $title, null, null); if ($title != null) { $this->setButtonContent($title); } }
/** * Create a new action button. * @param action The method to call when the button is clicked * @param title The label on the button * @param image The default image to display * @param hoverImage The image to display on hover * @param form The parent form, auto-set when the field is placed inside a form */ function __construct($action, $title = "", $image = "", $hoverImage = null, $className = null, $form = null) { Deprecation::notice('3.0', "Use FormAction with setAttribute('src', 'myimage.png') and custom JavaScript to achieve hover effect"); $this->image = $image; $this->hoverImage = $hoverImage; $this->className = $className; parent::__construct($action, $title, $form); }
/** * Create a new action button. * @param action The method to call when the button is clicked * @param title The label on the button * @param confirmation The message to display in the confirmation box * @param form The parent form, auto-set when the field is placed inside a form */ function __construct($action, $title = "", $confirmation = null, $form = null) { if ($confirmation) { $this->confirmation = $confirmation; } else { $this->confirmation = _t('ConfirmedFormAction.CONFIRMATION', "Are you sure?", PR_MEDIUM, 'Confirmation popup before executing the form action'); } parent::__construct($action, $title, $form); }
/** * @param GridField $gridField * @param string $name * @param string $title * @param string $actionName * @param array $args */ public function __construct(GridField $gridField, $name, $title, $actionName, $args) { $this->gridField = $gridField; $this->actionName = $actionName; $this->args = $args; parent::__construct($name, $title); }
function __construct() { parent::__construct('addtocampaign', _t('CAMPAIGNS.ADDTOCAMPAIGN', 'Add to campaign')); $this->addExtraClass('add-to-campaign-action'); $this->setValidationExempt(true); }
/** * Create a new action button. * @param action The method to call when the button is clicked * @param title The label on the button * @param confirmation The message to display in the confirmation box? * @param form The parent form, auto-set when the field is placed inside a form */ function __construct($action, $title = "", $ajaxAction = null, $form = null) { $this->ajaxAction = $ajaxAction ? $ajaxAction : $action; parent::__construct($action, $title, $form); }
/** * @param FormAction $action * @param string $title * @param Form $form */ public function __construct($action, $title = "", $form = null) { parent::__construct($action, $title, $form); }
function __construct() { parent::__construct(); $this->params_type = $this->_defineParamsType(); }
public function __construct($action, $title = "", $form = null) { $this->confirmText = _t('FormActionConfirm.AREYOUSURE', "Are you sure ?"); parent::__construct($action, $title, $form); }
/** * Create the form action with a useful description. * * @param String $action * @param String $title * @param Form $form * @param String $extraData * @param String $extraClass */ function __construct($action, $title = "", $form = null, $extraData = null, $extraClass = '') { $this->description = "Remove item #{$title}"; parent::__construct($action, $title, $form, $extraData, $extraClass); }
/** * * Create a new action button. * * @param action The method to call when the button is clicked * @param title The label on the button * @param form The parent form, auto-set when the field is placed inside a form */ public function __construct($action, $title = "", $form = null) { parent::__construct($action, $title, $form); $this->sendingMessage = _t('BootstrapLoadingFormAction.LOADING', 'BootstrapLoadingFormAction.LOADING'); }
public function __construct($name, $title = null, \Form $form, \GridFieldDetailForm_ItemRequest $request) { $this->request = $request; return parent::__construct($name, $title, $form); }
/** * Create a new action button. * @param action The method to call when the button is clicked * @param title The label on the button * @param confirmation The message to display in the confirmation box? * @param form The parent form, auto-set when the field is placed inside a form */ function __construct($action, $title = "", $confirmation = "Are you sure?", $form = null) { $this->confirmation = $confirmation; parent::__construct($action, $title, $form); }