PHP code example of iliain / silverstripe-droppable
1. Go to this page and download the library: Download iliain/silverstripe-droppable library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
iliain / silverstripe-droppable example snippets
use Iliain\Droppable\Fields\DroppableTextareaField;
$droppable = DroppableTextareaField::create('Example', 'Example', 'This is an example')
->setRows(5)
->setButtonRow(0, [
['[OPTION_1]', 'Option 1'],
['[OPTION_2]', 'Option 2'],
])
->setButtonRow(1, [
['[OPTION_3]', 'Option 3']
])
->pushButton(1, ['[OPTION_4]', 'Option 4']);