{"action":"created","issue":{"url":"https://api.github.com/repos/civicrm/civicrm-core/issues/5456","labels_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/5456/labels{/name}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/5456/comments","events_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/5456/events","html_url":"https://github.com/civicrm/civicrm-core/pull/5456","id":63455302,"number":5456,"title":"add addField methode to CRM_Core_Form CRM-16130","user":{"login":"mallezie","id":1926222,"avatar_url":"https://avatars.githubusercontent.com/u/1926222?v=3","gravatar_id":"","url":"https://api.github.com/users/mallezie","html_url":"https://github.com/mallezie","followers_url":"https://api.github.com/users/mallezie/followers","following_url":"https://api.github.com/users/mallezie/following{/other_user}","gists_url":"https://api.github.com/users/mallezie/gists{/gist_id}","starred_url":"https://api.github.com/users/mallezie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mallezie/subscriptions","organizations_url":"https://api.github.com/users/mallezie/orgs","repos_url":"https://api.github.com/users/mallezie/repos","events_url":"https://api.github.com/users/mallezie/events{/privacy}","received_events_url":"https://api.github.com/users/mallezie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-21T21:08:28Z","updated_at":"2015-03-23T14:45:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/5456","html_url":"https://github.com/civicrm/civicrm-core/pull/5456","diff_url":"https://github.com/civicrm/civicrm-core/pull/5456.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/5456.patch"},"body":"https://issues.civicrm.org/jira/browse/CRM-16130\r\n\r\nFirst version which supports some fields, not yet all, but more of addSelect. Has first conversions. \r\nI think we should start converting forms from here, and add functioniality to the method when needed. \r\n2 possible goals should be to use this as much as possible, and also use it for customfields. "},"comment":{"url":"https://api.github.com/repos/civicrm/civicrm-core/issues/comments/85030971","html_url":"https://github.com/civicrm/civicrm-core/pull/5456#issuecomment-85030971","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/5456","id":85030971,"user":{"login":"mallezie","id":1926222,"avatar_url":"https://avatars.githubusercontent.com/u/1926222?v=3","gravatar_id":"","url":"https://api.github.com/users/mallezie","html_url":"https://github.com/mallezie","followers_url":"https://api.github.com/users/mallezie/followers","following_url":"https://api.github.com/users/mallezie/following{/other_user}","gists_url":"https://api.github.com/users/mallezie/gists{/gist_id}","starred_url":"https://api.github.com/users/mallezie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mallezie/subscriptions","organizations_url":"https://api.github.com/users/mallezie/orgs","repos_url":"https://api.github.com/users/mallezie/repos","events_url":"https://api.github.com/users/mallezie/events{/privacy}","received_events_url":"https://api.github.com/users/mallezie/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T14:45:37Z","updated_at":"2015-03-23T14:45:37Z","body":"Perhaps we do should go for the getter function, this makes it possibly to override a form and adding a dynamically getContext function. Suppose i want to make a form for two contexts, then i can do \r\n\r\n´´´class myform extends core form{\r\nfunction getContext(){\r\n  $context = parent::getContext();\r\n  if(url_of_this_form() = 'blablasearch'){\r\n    return 'search;\r\n  }\r\n  else{\r\n    return $context\r\n  }\r\n}\r\n´´´\r\nSomething i can do now with the entity, but wouldn't be able to do with the class property. \r\nI'm not sure if it's a good thing to do, but it could be possible. "}}