Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Page manipulation API functions #920

Closed
esclkm opened this Issue · 5 comments

4 participants

@esclkm
Collaborator

add

cot_page_add()
cot_page_edit()
cot_page_delete()

functions

@ghengeveld
Owner

The same is true for many other modules. It would be nice to have CRUD functions in all modules.

@esclkm
Collaborator

may be also classes - for easy unddurstanding

@trustmaster
Owner

Classes are the job for cot-factory, which is an optional bundle.

@ElNinjo

GREAT!!! I was dreaming about this... And also, about cot_adduser.
I think there are such stuff in Drupal, but I may be wrong.

@trustmaster trustmaster was assigned
@trustmaster
Owner

The following functions have been implemented:

  • cot_page_auth() - to return auth permissions for a specific page category;
  • cot_page_import() - to import page fields regardless of the caller function or request method;
  • cot_page_validate() - to validate imported page data;
  • cot_page_add() - to save the page in the database and call event handlers;
  • cot_page_delete() - to remove the page from the database and call event handlers;
  • cot_page_update() - to update the page in the database and call event handlers.

Please see PHPDocs for these functions in page.functions.php for more information.

Warning to extension developers: the code of the following hooks has been moved from global scope into local function scope, so you should review your plugins using these hooks and make sure all variables are either declared in the function or declared as global explicitly:

  • page.add.add.query
  • page.add.add.done
  • page.edit.delete.done
  • page.edit.update.done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.