gorriecoe / silverstripe-sreg
Simple tokenizer that allows you to use .ss template like variables in a dataobjects string.
Installs: 132
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- silverstripe/framework: ^4.0
README
Simple tokenizer that allows you to use .ss template like variables in a dataobjects string.
Installation
Composer is the recommended way of installing SilverStripe modules.
composer require gorriecoe/silverstripe-sreg
Requirements
- silverstripe/framework ^4.0
Maintainers
Usage
class MyObject extends DataObject { private static $has_one = [ 'Relation' => 'SomeObject', 'AFallBack' => 'SomeObject', ]; public function SomeFunction() { return 'Some text'; } public function getValue() { return $this->sreg('Lorem ipsum {$Relation.Title|AFallBack.Title|Fall back text} {$SomeFunction}'); } }