{"record":{"id":"18755af07a39739a","repo":"octobercms/october","slug":"class-class-must-define-property-property-used","errorCode":null,"errorMessage":"Class :class must define property $:property used by :behavior behavior.","messagePattern":"Class :class must define property \\$:property used by :behavior behavior\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/classes/ControllerBehavior.php","lineNumber":56,"sourceCode":"\n    /**\n     * @var array actions visible in context of the controller. Only takes effect if it is an array\n     */\n    protected $actions;\n\n    /**\n     * __construct the behavior\n     */\n    public function __construct($controller)\n    {\n        $this->controller = $controller;\n        $this->viewPath = $this->configPath = $this->guessViewPath('/partials');\n        $this->assetPath = $this->guessViewPath('/assets', true);\n\n        // Validate controller properties\n        foreach ($this->requiredProperties as $property) {\n            if (!isset($controller->{$property})) {\n                throw new ApplicationException(Lang::get('system::lang.behavior.missing_property', [\n                    'class' => get_class($controller),\n                    'property' => $property,\n                    'behavior' => get_called_class()\n                ]));\n            }\n        }\n\n        // Hide all methods that aren't explicitly listed as actions\n        if (is_array($this->actions)) {\n            $this->hideAction(array_diff(get_class_methods(get_class($this)), $this->actions));\n        }\n\n        // Constructor logic that is protected by authentication\n        $controller->bindEvent('page.beforeDisplay', function() {\n            $this->beforeDisplay();\n        });\n    }\n","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/classes/ControllerBehavior.php#L38-L74","documentation":"Error \"Class :class must define property $:property used by :behavior behavior.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/classes/ControllerBehavior.php:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}