Skip to content

Instantly share code, notes, and snippets.

@splittingred
Created November 1, 2011 21:26
Show Gist options
  • Save splittingred/1331961 to your computer and use it in GitHub Desktop.
Save splittingred/1331961 to your computer and use it in GitHub Desktop.
2.2 Chunk Create Processor
<?php
require_once (dirname(dirname(__FILE__)).'/create.class.php');
/**
* Creates a chunk.
*
* @param string $name The name of the chunk.
* @param string $description (optional) The description of the chunk.
* @param integer $category The category the chunk is assigned to.
* @param string $snippet The code of the chunk.
* @param boolean $locked Whether or not the chunk can only be accessed by
* administrators.
* @param json $propdata A json array of properties to store.
*
* @package modx
* @subpackage processors.element.chunk
*/
class modChunkCreateProcessor extends modElementCreateProcessor {
public $classKey = 'modChunk';
public $languageTopics = array('chunk');
public $permission = 'new_chunk';
public $managerAction = 'new_chunk';
public $elementType = 'chunk';
public $eventBeforeSave = 'OnBeforeChunkFormSave';
public $eventAfterSave = 'OnChunkFormSave';
}
return 'modChunkCreateProcessor';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment