for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class DynamicBlocksSiteTreeDataExtension extends DataExtension
{
/**
* @param FieldList $fields
*/
public function updateCMSFields(FieldList $fields)
if ($blocks = $fields->dataFieldByName('Blocks')) {
$config = $blocks->getConfig();
getConfig()
FormField
config()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
if ($this->owner->blockManager) {
$areas = $this->owner->blockManager->getAreasForPageType($this->owner->ClassName);
if ($areas && count($areas)) {
$config->addComponent(new GridFieldGroupable(
'BlockArea',
'Area',
'none',
$areas
));
}
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.