Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class FormzFieldCreateProcessor extends modObjectCreateProcessor {

/* Used to load the correct language error message */
public $objectType = 'formz.field';

public $beforeSaveEvent = 'OnFormzFormsFieldsBeforeSave';

public function beforeSave() {
$formId = $this->getProperty('form_id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class FormzFieldRemoveProcessor extends modObjectRemoveProcessor {

/* Used to load the correct language error message */
public $objectType = 'formz.field';

public $beforeRemoveEvent = 'OnFormzFormsFieldsBeforeRemove';
}

return 'FormzFieldRemoveProcessor';
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class FormzFieldUpdateProcessor extends modObjectUpdateProcessor {

/* Used to load the correct language error message */
public $objectType = 'formz.field';

public $beforeSaveEvent = 'OnFormzFormsFieldsBeforeSave';

/* Set the default validation type to false for no validation on field type */
private $validationType = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ public function prepareQueryBeforeCount(xPDOQuery $c) {
'name:LIKE' => '%' . $query . '%',
));
}

$this->modx->invokeEvent('OnFormzFormsPrepareQueryBeforeCount',array(
'query' => $query,
'c' => &$c,
));

return $c;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class FormzRemoveProcessor extends modObjectRemoveProcessor {

/* Used to load the correct language error message */
public $objectType = 'formz.form';

public $beforeRemoveEvent = 'OnFormzFormsBeforeRemove';
}

return 'FormzRemoveProcessor';
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class FormzUpdateProcessor extends modObjectUpdateProcessor {

/* Used to load the correct language error message */
public $objectType = 'formz.form';


public $beforeSaveEvent = 'OnFormzFormsBeforeSave';

public function beforeSave() {
// Setting creator and time created
$this->object->set('editedby', $this->modx->user->get('id'));
Expand Down