Automatic Clickbutton Scripts

Request registrieren und gleichzeitig einen vollständigen Click-Command-String erhalten.


$jybridCmsPost = Factory::register('myPostRequest', Request::gi()->setMethodPost());
$jybridCmsPost->getButtonScript()
    ->addParameter('task', 'clearLogger')                   // sets an Parameter
    ->addParameter('task', 'overWrite')                     // Overwrite the 'task' with an new Value
    ->addParameterArray(['task1' => 'task1Value'], 'task')  // Overwrite the 'task' with an array/object

@todo describe override from an parameter-array to the next

<li>
    <a class="button is-tertiary" href="javascript:void(null)"
        onclick="<?php echo $btn->addParameterArray(['task'             => 'removeClass',
                                                                'classNameToTouch' => 'redBackground'], 'task') ?>">[remove
                                only the red background-class]</a>
                        </li>
<li>
                            <a class="button is-tertiary" href="javascript:void(null)"
                               onclick="<?php echo $btn->addParameterArray(['task'             => 'setClass',
                                                                'classNameToTouch' => 'blueText redBackground'], 'task') ?>">[set "blueText redBackground" in a string]</a>
                        </li>

live-demo

@see schematic-ajax-classNames.php

@see schematic-button-parameters.php