Line 40 in /srv/users/allremove/apps/allremove-silverstripe-4-7-2/public/vendor/silverstripe/cms/code/Controllers/ModelAsController.php
31 32 /** 33 * Get the appropriate {@link ContentController} for handling a {@link SiteTree} object, link it to the object and 34 * return it. 35 * 36 * @param SiteTree $sitetree 37 * @param string $action 38 * @return ContentController 39 */ 40 public static function controller_for(SiteTree $sitetree, $action = null) 41 { 42 $controller = $sitetree->getControllerName(); 43 44 if ($action && class_exists($controller . '_' . ucfirst($action ?? ''))) { 45 $controller = $controller . '_' . ucfirst($action ?? ''); 46 }