[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_scheduler/src/Table/ -> TaskTable.php (summary)

(no description)

Copyright: (C) 2021 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 292 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

TaskTable:: (6 methods):
  __construct()
  check()
  store()
  _getAssetName()
  bind()
  unlock()


Class: TaskTable  - X-Ref

Table class for tasks scheduled through `com_scheduler`.
The type alias for Task table entries is `com_scheduler.task`.

__construct(DatabaseDriver $db)   X-Ref
TaskTable constructor override, needed to pass the DB table name and primary key to {@see Table::__construct()}.

param: DatabaseDriver  $db  A database connector object.

check()   X-Ref
Overloads {@see Table::check()} to perform sanity checks on properties and make sure they're
safe to store.

return: boolean  True if checks pass.

store($updateNulls = true)   X-Ref
Override {@see Table::store()} to update null fields as a default, which is needed when DATETIME
fields need to be updated to NULL. This override is needed because {@see AdminModel::save()} does not
expose an option to pass true to Table::store(). Also ensures the `created` and `created_by` fields are
set.

param: boolean  $updateNulls  True to update fields even if they're null.
return: boolean  True if successful.

_getAssetName()   X-Ref
Returns the asset name of the entry as it appears in the {@see Asset} table.

return: string  The asset name.

bind($src, $ignore = array()   X-Ref
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
null if a task is configured to execute only on manual trigger.

param: array|object  $src     An associative array or object to bind to the Table instance.
param: array|string  $ignore  An optional array or space separated list of properties to ignore while binding.
return: boolean

unlock(array $pks = [], ?int $userId = null)   X-Ref
Release pseudo-locks on a set of task records. If an empty set is passed, this method releases lock on its
instance primary key, if available.

param: integer[]  $pks     An optional array of primary key values to update. If not set the instance property
param: ?int       $userId  ID of the user unlocking the tasks.
return: boolean  True on success; false if $pks is empty.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer