1. Go to this page and download the library: Download jeanvaljean/active-behavior 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/ */
$this->addBehavior('Active.Active', [
'active_field' => 'active', // the table's field you want for storing the active state of an entity
'group' => '', // the table's field you want to use for grouping the active behavior on specific entities
'keep_active' => true, // to make sure that always one entity is active
'multiple' => false // to authorize several entities to be active
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.