This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// file: mysite/code/TranslatableControllerExtension.php | |
class TranslatableControllerExtension extends Extension { | |
/** | |
* save the current controller to ensure we have access to it, | |
* this is necessary because Security crates a fake Page_Controller to render templates | |
* @var Controller | |
*/ | |
protected static $actual_current_controller; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Extensions; | |
class BaseElementExtension extends Extension | |
{ | |
/** | |
* Flag to indiciate if this element is a new element. Used because isChanged('ID') seems to be unreliable | |
* | |
* @var bool |