Simple tokenizer that allows you to use .ss template like variables in a dataobjects string.
Simple tokenizer that allows you to use .ss template like variables in a dataobjects string.
Composer is the recommended way of installing SilverStripe modules.
composer require gorriecoe/silverstripe-sreg
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}');
}
}
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem