-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Jens Kooij edited this page Sep 4, 2017
·
8 revisions
You can start developing your own templates in the templates
folder.
A good point to start is probably the base.php
template. From there on out
you can create a folder structure that you feel works best.
Creating custom Components should be done in the components
folder. A good default
template for starting to develop components is found here.
<?php
namespace components;
use \CloudControl\Cms\components\BaseComponent;
use \CloudControl\Cms\storage\Storage;
class NewComponent extends BaseComponent
{
/**
* Implement logic to be excecuted when the component
* gets runned. Good examples are retrieving data from
* the datastorage and assigning them for usage in the
* template, like so: $this->parameters['variable'] = 'value';
*
* In the template these variables can be displayed using the
* following tag: <?=$variable?>
*
* @param \CloudControl\Cms\storage\Storage $storage
*
* @return void
*/
public function run(Storage $storage)
{
parent::run($storage);
// TODO: Change the autogenerated stub
}
}