setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return DAOSaveAction */ public static function save($checkPermissions = TRUE) { return (new DAOSaveAction(static::class, __FUNCTION__)) ->setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return DAOGetFieldsAction */ public static function getFields($checkPermissions = TRUE) { return (new DAOGetFieldsAction(static::class, __FUNCTION__)) ->setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return DAOCreateAction */ public static function create($checkPermissions = TRUE) { return (new DAOCreateAction(static::class, __FUNCTION__)) ->setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return DAOUpdateAction */ public static function update($checkPermissions = TRUE) { return (new DAOUpdateAction(static::class, __FUNCTION__)) ->setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return DAODeleteAction */ public static function delete($checkPermissions = TRUE) { return (new DAODeleteAction(static::class, __FUNCTION__)) ->setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return BasicReplaceAction */ public static function replace($checkPermissions = TRUE) { return (new BasicReplaceAction(static::class, __FUNCTION__)) ->setCheckPermissions($checkPermissions); } /** * @param bool $plural * Whether to return a plural title. * @return string */ protected static function getEntityTitle($plural = FALSE) { $name = static::getEntityName(); $dao = \CRM_Core_DAO_AllCoreTables::getFullName($name); return $dao ? $dao::getEntityTitle($plural) : $name; } /** * @return array */ public static function getInfo() { $info = parent::getInfo(); $dao = \CRM_Core_DAO_AllCoreTables::getFullName($info['name']); if ($dao) { $info['icon'] = $dao::$_icon; $info['dao'] = $dao; } return $info; } }