abstract class Backend_Controller_Crud_Vc

This is the base class for implementing CRUD backend interfaces (creating, editing, updating and deleting) for ORM object under version control (DVelum 0.9 and higher).

abstract class Backend_Controller_Crud_Vc extends Backend_Controller_Crud
{
    /**
     * Default action
     */
    public function indexAction()

    /**
     * Check for permissions to publish the object
     */
    protected function _checkCanPublish()

    /**
     * Get items list. Returns JSON  reply with 
     * ORM object field data;
     * Filtering, pagination and search are available
     * Sends JSON reply in the result
     * and closes the application.
     */
    public function listAction()

    /**
     * Get the object data ready to be sent
     * @param Db_Object $object
     * @param integer $id
     * @param integer $version
     * @return array
     */
    protected function _loadData(Db_Object $object , $version)

    /**
     * Get ORM object data
     * Sends JSON reply in the result
     * and closes the application.
     */
    public function loaddataAction()

    /**
     * Delete object
     * Sends JSON reply in the result
     * and closes the application.
     */
    public function deleteAction()

    /**
     * Unpublish object
     * Sends JSON reply in the result
     * and closes the application.
     */
    public function unpublishAction()

    /**
     * Publish object data changes
     * Sends JSON reply in the result
     * and closes the application.
     */
    public function publishAction()

    /**
     * Define the object data preview page URL
     * (needs to be redefined in the child class
     * as per the application structure)
     * @param Db_Object $object
     * @return string
     */
    public function getStagingUrl(Db_Object $object)

    /**
     * Add new ORM object
     * Create first version
     * Sends JSON reply in the result
     * and closes the application.
     * @param Db_Object $object
     * @return void
     */
    public function insertObject(Db_Object $object)
	
    /**
     * Update object data, 
     * In this case, a new version is created
     * Sends JSON reply in the result
     * and closes the application.
     * @param Db_Object $object
     */
    public function updateObject(Db_Object $object)
	
    /**
     * Unpublish object
     * Sends JSON reply in the result
     * and closes the application.
     * @param Db_Object $object
     */
    public function unpublishObject(Db_Object $object)
}

comments powered by Disqus