* @return DAOGetAction
*/
public static function get($checkPermissions = TRUE) {
- return (new DAOGetAction(static::class, __FUNCTION__))
+ return (new DAOGetAction(static::getEntityName(), __FUNCTION__))
->setCheckPermissions($checkPermissions);
}
* @return DAOSaveAction
*/
public static function save($checkPermissions = TRUE) {
- return (new DAOSaveAction(static::class, __FUNCTION__))
+ return (new DAOSaveAction(static::getEntityName(), __FUNCTION__))
->setCheckPermissions($checkPermissions);
}
* @return DAOGetFieldsAction
*/
public static function getFields($checkPermissions = TRUE) {
- return (new DAOGetFieldsAction(static::class, __FUNCTION__))
+ return (new DAOGetFieldsAction(static::getEntityName(), __FUNCTION__))
->setCheckPermissions($checkPermissions);
}
* @return DAOCreateAction
*/
public static function create($checkPermissions = TRUE) {
- return (new DAOCreateAction(static::class, __FUNCTION__))
+ return (new DAOCreateAction(static::getEntityName(), __FUNCTION__))
->setCheckPermissions($checkPermissions);
}
* @return DAOUpdateAction
*/
public static function update($checkPermissions = TRUE) {
- return (new DAOUpdateAction(static::class, __FUNCTION__))
+ return (new DAOUpdateAction(static::getEntityName(), __FUNCTION__))
->setCheckPermissions($checkPermissions);
}
* @return DAODeleteAction
*/
public static function delete($checkPermissions = TRUE) {
- return (new DAODeleteAction(static::class, __FUNCTION__))
+ return (new DAODeleteAction(static::getEntityName(), __FUNCTION__))
->setCheckPermissions($checkPermissions);
}
* @return BasicReplaceAction
*/
public static function replace($checkPermissions = TRUE) {
- return (new BasicReplaceAction(static::class, __FUNCTION__))
+ return (new BasicReplaceAction(static::getEntityName(), __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['paths'] = $dao::getEntityPaths();
- $info['icon'] = $dao::$_icon;
- $info['dao'] = $dao;
- }
- return $info;
- }
-
}