-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Service API Additions #2992
Comments
If you have the time we’d certainly welcome a PR :) As far as fixing naming inconsistencies goes, we’ll need to maintain all current methods for backwards compatibility, but they can be deprecated and just wrap the new method. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Presently, with some Craft services, there exist functions such as the following:
These functions allow objects managed by the service to be deleted via providing an ID, or providing the object itself, respectively. However, there are a few cases where there is only a
ById
form of these functions, such as\craft\services\Categories::deleteGroupById()
, and\craft\services\Structures::deleteStructureById()
, among others.For consistency, it would be nice to see equivalent functions added for these services. If this sounds like a good idea, I could create a PR with these changes.
Additionally, there are two instances of function names that seem inconsistent with the rest of the definitions:
\craft\services\Tags::deleteTagGroup()
and\craft\services\Tags::deleteTagGroupById()
specify their group types, whereas the other services that manage some kind of 'group' object leave off the type name, and simply usedeleteGroup
and similar. This is the case with Categories, Fields, Sites, and UserGroups.\craft\services\AssetTransforms::deleteTransform()
Takes an ID instead of a transform itself, which it then uses to find an appropriate transform.The text was updated successfully, but these errors were encountered: