PHP code example of dynamic / silverstripe-elemental-baseobject
1. Go to this page and download the library: Download dynamic/silverstripe-elemental-baseobject 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/ */
dynamic / silverstripe-elemental-baseobject example snippets
use Dynamic\BaseObject\Model\BaseElementObject;
use DNADesign\Elemental\Models\BaseElement;
class ElementAccordion extends BaseElement
{
private static $has_many = [
'Items' => BaseElementObject::class,
];
}
use Dynamic\BaseObject\Model\BaseElementObject;
class PromoObject extends BaseElementObject
{
private static $db = [
'Subtitle' => 'Varchar(255)',
];
private static $table_name = 'PromoObject';
}