Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Page manipulation API functions #920

esclkm opened this Issue Apr 20, 2012 · 5 comments


None yet
4 participants

esclkm commented Apr 20, 2012





ghengeveld commented Jun 13, 2012

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


esclkm commented Jun 13, 2012

may be also classes - for easy unddurstanding


trustmaster commented Jun 13, 2012

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

ElNinjo commented Jun 14, 2012

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

@ghost ghost assigned trustmaster Oct 18, 2012


trustmaster commented Oct 18, 2012

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