{"action":"created","issue":{"url":"https://api.github.com/repos/qcubed/framework/issues/630","labels_url":"https://api.github.com/repos/qcubed/framework/issues/630/labels{/name}","comments_url":"https://api.github.com/repos/qcubed/framework/issues/630/comments","events_url":"https://api.github.com/repos/qcubed/framework/issues/630/events","html_url":"https://github.com/qcubed/framework/issues/630","id":58828052,"number":630,"title":"alpha-3: codegen uses in core controls","user":{"login":"vakopian","id":2228819,"avatar_url":"https://avatars.githubusercontent.com/u/2228819?v=3","gravatar_id":"","url":"https://api.github.com/users/vakopian","html_url":"https://github.com/vakopian","followers_url":"https://api.github.com/users/vakopian/followers","following_url":"https://api.github.com/users/vakopian/following{/other_user}","gists_url":"https://api.github.com/users/vakopian/gists{/gist_id}","starred_url":"https://api.github.com/users/vakopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vakopian/subscriptions","organizations_url":"https://api.github.com/users/vakopian/orgs","repos_url":"https://api.github.com/users/vakopian/repos","events_url":"https://api.github.com/users/vakopian/events{/privacy}","received_events_url":"https://api.github.com/users/vakopian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/qcubed/framework/milestones/5","html_url":"https://github.com/qcubed/framework/milestones/3.0%20Release","labels_url":"https://api.github.com/repos/qcubed/framework/milestones/5/labels","id":247832,"number":5,"title":"3.0 Release","description":"Major infrastructure changes:\r\n1. php 5.3.2+ (for composer)\r\n2. directory restructuring (to simplify the contribution to the qcubed)\r\n3. composer for all dependencies and for qcubed itself","creator":{"login":"olegabr","id":2850808,"avatar_url":"https://avatars.githubusercontent.com/u/2850808?v=3","gravatar_id":"","url":"https://api.github.com/users/olegabr","html_url":"https://github.com/olegabr","followers_url":"https://api.github.com/users/olegabr/followers","following_url":"https://api.github.com/users/olegabr/following{/other_user}","gists_url":"https://api.github.com/users/olegabr/gists{/gist_id}","starred_url":"https://api.github.com/users/olegabr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olegabr/subscriptions","organizations_url":"https://api.github.com/users/olegabr/orgs","repos_url":"https://api.github.com/users/olegabr/repos","events_url":"https://api.github.com/users/olegabr/events{/privacy}","received_events_url":"https://api.github.com/users/olegabr/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":36,"state":"open","created_at":"2013-01-20T08:31:38Z","updated_at":"2015-02-24T23:59:42Z","due_on":"2013-12-31T08:00:00Z","closed_at":null},"comments":3,"created_at":"2015-02-24T23:59:42Z","updated_at":"2015-02-25T08:02:02Z","closed_at":null,"body":"In alpha-3 many `Codegen_` static functions have been added to core control classes.\r\nI'm not sure why this was necessary, but I don't think QCubed core should have any dependency on codegen. In fact one of my goals is to separate codegen into it's own project separate from qcubed core (and pulled with composer).\r\nCan we move these new methods into some helper classes inside codegen?\r\n"},"comment":{"url":"https://api.github.com/repos/qcubed/framework/issues/comments/75920206","html_url":"https://github.com/qcubed/framework/issues/630#issuecomment-75920206","issue_url":"https://api.github.com/repos/qcubed/framework/issues/630","id":75920206,"user":{"login":"vakopian","id":2228819,"avatar_url":"https://avatars.githubusercontent.com/u/2228819?v=3","gravatar_id":"","url":"https://api.github.com/users/vakopian","html_url":"https://github.com/vakopian","followers_url":"https://api.github.com/users/vakopian/followers","following_url":"https://api.github.com/users/vakopian/following{/other_user}","gists_url":"https://api.github.com/users/vakopian/gists{/gist_id}","starred_url":"https://api.github.com/users/vakopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vakopian/subscriptions","organizations_url":"https://api.github.com/users/vakopian/orgs","repos_url":"https://api.github.com/users/vakopian/repos","events_url":"https://api.github.com/users/vakopian/events{/privacy}","received_events_url":"https://api.github.com/users/vakopian/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T08:02:02Z","updated_at":"2015-02-25T08:02:02Z","body":"As the _Make Your Own Plugin, Part 1: Writing Custom Controls_ example explains (in `components.php`), to use a plugin control (that does not extend one of the core controls) as part of the code generator, the plugin control class has to define some static methods like `Codegen_ConnectorCreate()`, `Codegen_ConnectorRefresh()`, etc.\r\nWith my proposed change, instead of putting these static methods into the plugin control class, the plugin package would have to define a separate class named `ModelConnectorControlHelper_${PLUGIN_CONTROL_CLASS}` that implements the `ModelConnectorControlHelper` interface (of course it could also extend and override one of the existing subclasses in core codegen).\r\n\r\nNone of the current plugins for alpha3 uses this feature, so I can't really show a good example for an existing plugins. But I definitely like this feature and would use it when I port my projects (which are based on my jQCubed scaffolding) since I use many plugin controls in my custom templates. "}}