Skip to content

Commit

Permalink
DataObject: update @uses docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
wernerkrauss committed Nov 10, 2018
1 parent fbbbc47 commit ea4537c
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion src/ORM/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,8 @@ public function forceChange()
*
* @see {@link ValidationResult}
* @return ValidationResult
*
* @uses DataExtension->validate()
*/
public function validate()
{
Expand Down Expand Up @@ -1242,6 +1244,13 @@ protected function onBeforeDelete()
}
}

/**
* Event handler called after deleting from the database.
* You can overload this to clean up or otherwise process data after delete this
* record.
*
* @uses DataExtension->onAfterDelete()
*/
protected function onAfterDelete()
{
$this->extend('onAfterDelete');
Expand Down Expand Up @@ -1589,7 +1598,8 @@ public function writeComponents($recursive = false)
* Delete this data object.
* $this->onBeforeDelete() gets called.
* Note that in Versioned objects, both Stage and Live will be deleted.
* @uses DataExtension->augmentSQL()
* @uses DataExtension->updateDeleteTables()
* @uses DataExtension->updateDeleteTable()
*/
public function delete()
{
Expand Down Expand Up @@ -1905,6 +1915,8 @@ public function getRelationType($component)
* @return DataList|DataObject The component, either as a list or single object
* @throws BadMethodCallException
* @throws InvalidArgumentException
*
* @uses DataExtension->updateManyManyComponents()
*/
public function inferReciprocalComponent($remoteClass, $remoteRelation)
{
Expand Down Expand Up @@ -2009,6 +2021,8 @@ public function inferReciprocalComponent($remoteClass, $remoteRelation)
* @param string $componentName Name of the many-many component
* @param int|array $id Optional ID for parent of this relation, if not the current record
* @return ManyManyList|UnsavedRelationList The set of components
*
* @uses DataExtension->updateManyManyComponents()
*/
public function getManyManyComponents($componentName, $id = null)
{
Expand Down Expand Up @@ -2321,6 +2335,8 @@ protected function beforeUpdateCMSFields($callback)
* @see Good example of complex FormField building: SiteTree::getCMSFields()
*
* @return FieldList Returns a TabSet for usage within the CMS - don't use for frontend forms.
*
* @uses DataExtension->updateCMSFields()
*/
public function getCMSFields()
{
Expand All @@ -2341,6 +2357,8 @@ public function getCMSFields()
* including that dataobject's extensions customised actions could be added to the EditForm.
*
* @return FieldList an Empty FieldList(); need to be overload by solid subclass
*
* @uses DataExtension->updateCMSActions()
*/
public function getCMSActions()
{
Expand All @@ -2360,6 +2378,8 @@ public function getCMSActions()
*
* @param array $params See {@link scaffoldFormFields()}
* @return FieldList Always returns a simple field collection without TabSet.
*
* @uses DataExtension->updateFrontEndFields()
*/
public function getFrontEndFields($params = null)
{
Expand Down Expand Up @@ -2414,6 +2434,9 @@ public function getField($field)
* @param string $class Class to load the values from. Others are joined as required.
* Not specifying a tableClass will load all lazy fields from all tables.
* @return bool Flag if lazy loading succeeded
*
* @uses DataExtension->AugmentSQL()
* @uses DataExtension->AugmentLoadLazyFields()
*/
protected function loadLazyFields($class = null)
{
Expand Down Expand Up @@ -3116,6 +3139,8 @@ public static function get(
* @param string $orderby A sort expression to be inserted into the ORDER BY clause.
*
* @return DataObject|null The first item matching the query
*
* @uses DataExtension->cacheKeyComponent()
*/
public static function get_one($callerClass, $filter = "", $cache = true, $orderby = "")
{
Expand Down Expand Up @@ -3151,6 +3176,8 @@ public static function get_one($callerClass, $filter = "", $cache = true, $order
* @param boolean $persistent When true will also clear persistent data stored in the Cache system.
* When false will just clear session-local cached data
* @return DataObject $this
*
* @uses DataExtension->flushCache()
*/
public function flushCache($persistent = true)
{
Expand Down Expand Up @@ -3273,6 +3300,8 @@ public function getSourceQueryParams()
* Get list of parameters that should be inherited to relations on this object
*
* @return array
*
* @uses DataExtension->updateInheritableQueryParams()
*/
public function getInheritableQueryParams()
{
Expand Down Expand Up @@ -3428,6 +3457,8 @@ public function requireDefaultRecords()
* data object, uses a default selection of summary fields.
*
* @return array
*
* @uses DataExtension->updateSearchableFields()
*/
public function searchableFields()
{
Expand Down Expand Up @@ -3524,6 +3555,7 @@ public function searchableFields()
*
* @uses $field_labels
* @uses FormField::name_to_label()
* @uses DataExtension->updateFieldLabels()
*
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
*
Expand Down Expand Up @@ -3607,6 +3639,8 @@ public function fieldLabel($name)
* @todo use the translation apparatus to return a default field selection for the language
*
* @return array
*
* @uses DataExtension->updateSummaryFields()
*/
public function summaryFields()
{
Expand Down

0 comments on commit ea4537c

Please sign in to comment.