Skip to content

Commit

Permalink
Merge pull request #12318 from mattwire/inherit_core_form_task
Browse files Browse the repository at this point in the history
Make all form tasks inherit from Core_Form_Task
  • Loading branch information
eileenmcnaughton authored Jun 15, 2018
2 parents 36a26e2 + 31aaf09 commit e67ad14
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 230 deletions.
33 changes: 3 additions & 30 deletions CRM/Activity/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,10 @@
*/

/**
* Class for activity task actions.
* Class for activity form task actions.
* FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
class CRM_Activity_Form_Task extends CRM_Core_Form {

/**
* The task being performed.
*
* @var int
*/
protected $_task;

/**
* The additional clause that we restrict the search with.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The array that holds all the component ids.
*
* @var array
*/
protected $_componentIds;

/**
* The array that holds all the contact ids.
*
* @var array
*/
public $_contactIds;
class CRM_Activity_Form_Task extends CRM_Core_Form_Task {

/**
* The array that holds all the member ids.
Expand Down
30 changes: 1 addition & 29 deletions CRM/Campaign/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,7 @@
/**
* This class generates form components for relationship.
*/
class CRM_Campaign_Form_Task extends CRM_Core_Form {

/**
* The additional clause that we restrict the search.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The task being performed
*
* @var int
*/
protected $_task;

/**
* The array that holds all the contact ids
*
* @var array
*/
public $_contactIds;

/**
* The array that holds all the component ids
*
* @var array
*/
protected $_componentIds;
class CRM_Campaign_Form_Task extends CRM_Core_Form_Task {

/**
* The array that holds all the voter ids
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* This class generates form components for search-result tasks.
*/
class CRM_Contact_Form_Task extends CRM_Core_Form {
class CRM_Contact_Form_Task extends CRM_Core_Form_Task {

/**
* The task being performed
Expand Down
33 changes: 3 additions & 30 deletions CRM/Contribute/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,10 @@
*/

/**
* This class generates form components for relationship.
* Class for contribute form task actions.
* FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
class CRM_Contribute_Form_Task extends CRM_Core_Form {

/**
* The task being performed.
*
* @var int
*/
protected $_task;

/**
* The additional clause that we restrict the search with.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The array that holds all the component ids.
*
* @var array
*/
protected $_componentIds;
class CRM_Contribute_Form_Task extends CRM_Core_Form_Task {

/**
* The array that holds all the contribution ids.
Expand All @@ -64,13 +44,6 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form {
*/
protected $_contributionIds;

/**
* The array that holds all the contact ids.
*
* @var array
*/
public $_contactIds;

/**
* The array that holds all the mapping contribution and contact ids.
*
Expand Down
27 changes: 3 additions & 24 deletions CRM/Event/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,10 @@
*/

/**
* This class generates task actions for CiviEvent
*
* Class for event form task actions.
* FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
class CRM_Event_Form_Task extends CRM_Core_Form {

/**
* The task being performed.
*
* @var int
*/
protected $_task;

/**
* The additional clause that we restrict the search with.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The array that holds all the component ids.
*
* @var array
*/
protected $_componentIds;
class CRM_Event_Form_Task extends CRM_Core_Form_Task {

/**
* The array that holds all the participant ids.
Expand Down
16 changes: 1 addition & 15 deletions CRM/Export/Form/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/**
* This class gets the name of the file to upload
*/
class CRM_Export_Form_Select extends CRM_Core_Form {
class CRM_Export_Form_Select extends CRM_Core_Form_Task {

/**
* Various Contact types.
Expand Down Expand Up @@ -70,20 +70,6 @@ class CRM_Export_Form_Select extends CRM_Core_Form {

public $_componentTable;

/**
* Must be set to entity table name (eg. civicrm_participant) by child class
*
* @var string
*/
static $tableName = NULL;

/**
* Must be set to entity shortname (eg. event)
*
* @var string
*/
static $entityShortname = NULL;

/**
* Build all the data structures needed to build the form.
*
Expand Down
27 changes: 3 additions & 24 deletions CRM/Grant/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,10 @@
*/

/**
* This class generates task actions for CiviEvent
*
* Class for grant form task actions.
* FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
class CRM_Grant_Form_Task extends CRM_Core_Form {

/**
* The task being performed.
*
* @var int
*/
protected $_task;

/**
* The additional clause that we restrict the search with.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The array that holds all the component ids.
*
* @var array
*/
protected $_componentIds;
class CRM_Grant_Form_Task extends CRM_Core_Form_Task {

/**
* The array that holds all the grant ids.
Expand Down
26 changes: 3 additions & 23 deletions CRM/Mailing/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,10 @@
*/

/**
* This class generates form components for relationship
* Class for mailing form task actions.
* FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
class CRM_Mailing_Form_Task extends CRM_Core_Form {

/**
* The task being performed.
*
* @var int
*/
protected $_task;

/**
* The additional clause that we restrict the search with.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The array that holds all the component ids.
*
* @var array
*/
protected $_componentIds;
class CRM_Mailing_Form_Task extends CRM_Core_Form_Task {

/**
* Build all the data structures needed to build the form.
Expand Down
34 changes: 3 additions & 31 deletions CRM/Member/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,10 @@
*/

/**
* Class for civimember task actions
*
* Class for member form task actions.
* FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
class CRM_Member_Form_Task extends CRM_Core_Form {

/**
* The task being performed.
*
* @var int
*/
protected $_task;

/**
* The additional clause that we restrict the search with.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The array that holds all the component ids.
*
* @var array
*/
protected $_componentIds;

/**
* The array that holds all the contact ids.
*
* @var array
*/
public $_contactIds;
class CRM_Member_Form_Task extends CRM_Core_Form_Task {

/**
* The array that holds all the member ids.
Expand Down
26 changes: 3 additions & 23 deletions CRM/Pledge/Form/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,10 @@
*/

/**
* This class generates task actions for CiviEvent.
* Class for pledge form task actions.
* FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
class CRM_Pledge_Form_Task extends CRM_Core_Form {

/**
* The task being performed.
*
* @var int
*/
protected $_task;

/**
* The additional clause that we restrict the search with.
*
* @var string
*/
protected $_componentClause = NULL;

/**
* The array that holds all the component ids.
*
* @var array
*/
protected $_componentIds;
class CRM_Pledge_Form_Task extends CRM_Core_Form_Task {

/**
* The array that holds all the pledge ids.
Expand Down

0 comments on commit e67ad14

Please sign in to comment.