{"action":"created","issue":{"url":"https://api.github.com/repos/octobercms/october/issues/2381","repository_url":"https://api.github.com/repos/octobercms/october","labels_url":"https://api.github.com/repos/octobercms/october/issues/2381/labels{/name}","comments_url":"https://api.github.com/repos/octobercms/october/issues/2381/comments","events_url":"https://api.github.com/repos/octobercms/october/issues/2381/events","html_url":"https://github.com/octobercms/october/issues/2381","id":178317044,"number":2381,"title":"How to override component properties?","user":{"login":"poniatowski","id":2527815,"avatar_url":"https://avatars.githubusercontent.com/u/2527815?v=3","gravatar_id":"","url":"https://api.github.com/users/poniatowski","html_url":"https://github.com/poniatowski","followers_url":"https://api.github.com/users/poniatowski/followers","following_url":"https://api.github.com/users/poniatowski/following{/other_user}","gists_url":"https://api.github.com/users/poniatowski/gists{/gist_id}","starred_url":"https://api.github.com/users/poniatowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poniatowski/subscriptions","organizations_url":"https://api.github.com/users/poniatowski/orgs","repos_url":"https://api.github.com/users/poniatowski/repos","events_url":"https://api.github.com/users/poniatowski/events{/privacy}","received_events_url":"https://api.github.com/users/poniatowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-21T11:15:51Z","updated_at":"2016-09-21T16:43:56Z","closed_at":null,"body":"##### Expected behavior\r\nI would like in easy and proper way extend component properties `defineProperties()`.\r\n\r\n##### Actual behavior\r\nI could find easy way to extend component properties. At this moment is difficult to add or remove properties.\r\n"},"comment":{"url":"https://api.github.com/repos/octobercms/october/issues/comments/248671178","html_url":"https://github.com/octobercms/october/issues/2381#issuecomment-248671178","issue_url":"https://api.github.com/repos/octobercms/october/issues/2381","id":248671178,"user":{"login":"jBOKA","id":8607110,"avatar_url":"https://avatars.githubusercontent.com/u/8607110?v=3","gravatar_id":"","url":"https://api.github.com/users/jBOKA","html_url":"https://github.com/jBOKA","followers_url":"https://api.github.com/users/jBOKA/followers","following_url":"https://api.github.com/users/jBOKA/following{/other_user}","gists_url":"https://api.github.com/users/jBOKA/gists{/gist_id}","starred_url":"https://api.github.com/users/jBOKA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jBOKA/subscriptions","organizations_url":"https://api.github.com/users/jBOKA/orgs","repos_url":"https://api.github.com/users/jBOKA/repos","events_url":"https://api.github.com/users/jBOKA/events{/privacy}","received_events_url":"https://api.github.com/users/jBOKA/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T16:43:56Z","updated_at":"2016-09-21T16:43:56Z","body":"Haven't tested, but I guess you can simply extend the component class and override `defineProperties`. But you'd have to use this new component instead in the markup.\r\n\r\n```PHP\r\nclass ExtendedComponent extends ComponentToExtend\r\n{\r\n    public function defineProperties()\r\n    {\r\n        return parent::defineProperties() + [\r\n            'newProperty' => [\r\n                'title' => 'New property',\r\n                'default' => 'whatever',\r\n                'type' => 'string'\r\n            ]\r\n        ];\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"jBOKA"}}