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 c3a5209 commit c46b240
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 @@ -1015,6 +1015,8 @@ public function forceChange()
*
* @see {@link ValidationResult}
* @return ValidationResult
*
* @uses DataExtension->validate()
*/
public function validate()
{
Expand Down Expand Up @@ -1103,6 +1105,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 @@ -1442,7 +1451,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 @@ -1707,6 +1717,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 @@ -1813,6 +1825,8 @@ public function inferReciprocalComponent($remoteClass, $remoteRelation)
* Returns a many-to-many component, as a ManyManyList.
* @param string $componentName Name of the many-many component
* @return RelationList|UnsavedRelationList The set of components
*
* @uses DataExtension->updateManyManyComponents()
*/
public function getManyManyComponents($componentName)
{
Expand Down Expand Up @@ -2111,6 +2125,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 @@ -2131,6 +2147,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 @@ -2150,6 +2168,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 @@ -2198,6 +2218,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 @@ -2881,6 +2904,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 @@ -2916,6 +2941,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 @@ -3029,6 +3056,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 @@ -3184,6 +3213,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 @@ -3280,6 +3311,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 @@ -3348,6 +3380,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 c46b240

Please sign in to comment.