-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Not an issue but an idea:
foreach ($linkables as $class) {
$identifier = str_replace('\\', '-', strtolower($class));
$options[$identifier] = $class::LinkLabel();
$linkTipe->setSource($options);
$linkableFilterString = method_exists($class, 'linkableFilterString')? $class::linkableFilterString() : '';
$dropdown = new DropdownField($identifier, _t('HtmlEditorField.NEWS', $class::LinkLabel()), $class::get()->where($linkableFilterString)->map('ID', 'Title'));
$dropdown->addExtraClass('linkable');
$compositeField->insertBefore($dropdown, 'Description');
}
public static function linkableFilterString(){
return "StartDate >= CURDATE()";
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels