Jim Thaxton
|
Tuesday 29 December 2009 4:18:04 pm
I am creating a the custom edit handler for our site. I have the files in place and the new custom edit module available. When creating or saving an object in eZ, I can get to the FetchInput() function (I put a var_dump, exit or alternately an eZLog::write) but it never hits the publish functions. After publish, I want to take the image(s) upload and perform some additional manipulation. I did this for another project in an earlier version of eZ and that code does not work exactly which leads me to believe I am missing something with the updates. Our site is on version 4.1. Here is the code from my customedithandler.php function:
<?php
/* Custom edit handler for the Lux Goddess eZPublish Web site. On publish, new images and their aliases will be pushed to the cachefly cdn */
class customeditHandler extends eZContentObjectEditHandler{ function fetchInput( $http, &$module, &$class, $object, &$version, $contentObjectAttributes, $editVersion, $editLanguage, $fromLanguage ) { $logName = 'common.log'; $dir = 'var/log'; eZLog::write( 'fetchInput', $logName, $dir );
} static function storeActionList() { return array('publish'); } function publish( $contentObjectID, $contentObjectVersion ) { // fetch object $logName = 'notice.log'; $dir = 'var/log'; eZLog::write( 'publish', $logName, $dir ); $object =& eZContentObject::fetch( $contentObjectID );
var_dump($object); // get content class object $contentClass = $object->attribute('content_class'); } // publish}?><?php
/* Custom edit handler for the Lux Goddess eZPublish Web site. On publish, new images and their aliases will be pushed to the cachefly cdn */
class customeditHandler extends eZContentObjectEditHandler{ function fetchInput( $http, &$module, &$class, $object, &$version, $contentObjectAttributes, $editVersion, $editLanguage, $fromLanguage ) { $logName = 'common.log'; $dir = 'var/log'; eZLog::write( 'fetchInput', $logName, $dir );
} static function storeActionList() { return array('publish'); } function publish( $contentObjectID, $contentObjectVersion ) { // fetch object $logName = 'notice.log'; $dir = 'var/log'; eZLog::write( 'publish', $logName, $dir ); $object =& eZContentObject::fetch( $contentObjectID );
var_dump($object); // get content class object $contentClass = $object->attribute('content_class'); } // publish}?>
Web Developer
Coupon Cabin
Chicago, IL
|