From: Coleman Watts Date: Thu, 21 Jan 2021 22:57:18 +0000 (-0500) Subject: Afform - delete unused, nonfunctional apis X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f53420ea6771ad7375e1c30eaeb4d37795df52b1;p=civicrm-core.git Afform - delete unused, nonfunctional apis --- diff --git a/ext/afform/core/Civi/Api4/AfformPalette.php b/ext/afform/core/Civi/Api4/AfformPalette.php deleted file mode 100644 index e803aa0176..0000000000 --- a/ext/afform/core/Civi/Api4/AfformPalette.php +++ /dev/null @@ -1,68 +0,0 @@ - 'Parent:afl-name', - 'entity' => 'Parent', - 'title' => 'Name', - 'template' => '', - ], - [ - 'id' => 'Parent:afl-address', - 'entity' => 'Parent', - 'title' => 'Address', - 'template' => '', - ], - ]; - }))->setCheckPermissions($checkPermissions); - } - - /** - * @param bool $checkPermissions - * @return Generic\BasicGetFieldsAction - */ - public static function getFields($checkPermissions = TRUE) { - return (new Generic\BasicGetFieldsAction('AfformPalette', __FUNCTION__, function() { - return [ - [ - 'name' => 'id', - ], - [ - 'name' => 'entity', - ], - [ - 'name' => 'title', - ], - [ - 'name' => 'template', - ], - ]; - }))->setCheckPermissions($checkPermissions); - } - - /** - * @return array - */ - public static function permissions() { - return [ - "meta" => ["access CiviCRM"], - "default" => ["administer CiviCRM"], - ]; - } - -} diff --git a/ext/afform/core/Civi/Api4/AfformTag.php b/ext/afform/core/Civi/Api4/AfformTag.php deleted file mode 100644 index e2ca67f92b..0000000000 --- a/ext/afform/core/Civi/Api4/AfformTag.php +++ /dev/null @@ -1,61 +0,0 @@ - 'afl-entity', - 'attrs' => ['entity-name', 'matching-rule', 'assigned-values'], - ], - [ - 'name' => 'afl-name', - 'attrs' => ['contact-id', 'afl-label'], - ], - [ - 'name' => 'afl-contact-email', - 'attrs' => ['contact-id', 'afl-label'], - ], - ]; - }))->setCheckPermissions($checkPermissions); - } - - /** - * @param bool $checkPermissions - * @return Generic\BasicGetFieldsAction - */ - public static function getFields($checkPermissions = TRUE) { - return (new Generic\BasicGetFieldsAction('AfformTag', __FUNCTION__, function() { - return [ - [ - 'name' => 'name', - ], - [ - 'name' => 'attrs', - ], - ]; - }))->setCheckPermissions($checkPermissions); - } - - /** - * @return array - */ - public static function permissions() { - return [ - "meta" => ["access CiviCRM"], - "default" => ["administer CiviCRM"], - ]; - } - -} diff --git a/ext/afform/mock/tests/phpunit/api/v4/AfformPaletteTest.php b/ext/afform/mock/tests/phpunit/api/v4/AfformPaletteTest.php deleted file mode 100644 index 7f2ec85877..0000000000 --- a/ext/afform/mock/tests/phpunit/api/v4/AfformPaletteTest.php +++ /dev/null @@ -1,21 +0,0 @@ -addWhere('id', '=', 'Parent:afl-name') - ->execute(); - $this->assertEquals(1, $r->count()); - - $r = Civi\Api4\AfformPalette::get() - ->setLimit(10) - ->execute(); - $this->assertTrue($r->count() > 1); - } - -}