Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions administrator/components/com_scheduler/src/Table/TaskTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,44 @@ protected function _getAssetName(): string
return 'com_scheduler.task.' . (int) $this->$k;
}

/**
* Method to return the title to use for the asset table.
*
* @return string
*
* @since __DEPLOY_VERSION__
*/
protected function _getAssetTitle(): string
{
return $this->title;
}

/**
* Method to get the parent asset under which to register this one.
* By default, all assets are registered to the ROOT node with ID,
* which will default to 1 if none exists.
* The extended class can define a table and id to lookup. If the
* asset does not exist it will be created.
*
* @param Table|null $table A Table object for the asset parent.
* @param null $id Id to look up
*
* @return integer
*
* @since __DEPLOY_VERSION__
*/
protected function _getAssetParentId(Table $table = null, $id = null): int
{
$assetId = null;
$asset = new Asset($this->getDbo(), $this->getDispatcher());

if ($asset->loadByName('com_scheduler')) {
$assetId = $asset->id;
}

return $assetId ?? parent::_getAssetParentId($table, $id);
}

/**
* Override {@see Table::bind()} to bind some fields even if they're null given they're present in $src.
* This override is needed specifically for DATETIME fields, of which the `next_execution` field is updated to
Expand Down