PHP code example of chameleon2die4 / sage9-components
1. Go to this page and download the library: Download chameleon2die4/sage9-components 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/ */
chameleon2die4 / sage9-components example snippets
add_filter('sober/components/namespace', function () {
return 'Data\Partials';
});
namespace App\Controllers\Components;
use Chameleon2die4\Components\Component;
class Slider extends Component
{
/**
* Return images from Advanced Custom Fields
*
* @return array
*/
public function images()
{
return get_field('images');
}
}
public function __before()
{
// runs after this->data is set up, but before the class methods are run
}
public function __after()
{
// runs after all the class methods have run
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.