Skip to content

Commit

Permalink
DataExtension: add missing hooks, improve docblocks (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
wernerkrauss committed Nov 10, 2018
1 parent c46b240 commit ff26f5d
Showing 1 changed file with 61 additions and 2 deletions.
63 changes: 61 additions & 2 deletions src/ORM/DataExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,34 @@ public function populateDefaults()
{
}

/**
* @param Member|int $member
* @return bool
*/
public function can($member)
{
}

/**
* @param Member|int $member
* @return bool
*/
public function canEdit($member)
{
}

/**
* @param Member|int $member
* @return bool
*/
public function canDelete($member)
{
}

/**
* @param Member|int $member
* @return bool
*/
public function canCreate($member)
{
}
Expand Down Expand Up @@ -156,7 +172,7 @@ public function updateCMSActions(FieldList $actions)
}

/**
* this function is used to provide modifications to the summary fields in CMS
* This function is used to provide modifications to the summary fields in CMS
* by the extension
* By default, the summaryField() of its owner will merge more fields defined in the extension's
* $extra_fields['summary_fields']
Expand All @@ -179,7 +195,7 @@ public function updateSummaryFields(&$fields)
}

/**
* this function is used to provide modifications to the fields labels in CMS
* This function is used to provide modifications to the fields labels in CMS
* by the extension
* By default, the fieldLabels() of its owner will merge more fields defined in the extension's
* $extra_fields['field_labels']
Expand All @@ -193,4 +209,47 @@ public function updateFieldLabels(&$labels)
$labels = array_merge($labels, $field_labels);
}
}

/**
* Update the owner's default searchable fields
*
* @param array $fields
* @return array Array of field names
*/
public function updateSearchableFields($fields)
{
}

public function updateManyManyComponents(RelationList $list)
{

}

/**
* @param array $params
* @return array
*/
public function updateInheritableQueryParams($params)
{
}

/**
* Return a piece of text to keep DataObject cache keys appropriately specific.
*
* @see Versioned->cacheKeyComponent()
*
* @return string
*/
public function cacheKeyComponent()
{
}

/**
* flush owner's caches
*
* @return void
*/
public function flushCache()
{
}
}

0 comments on commit ff26f5d

Please sign in to comment.