php - Expected path to Sluggable builder in Symfony/Doctrine -
the default string normalization (provided doctrine_inflector::urlize()
"sluggifier") isn't suitable project, need utilize own algorithm.
i set schema follows:
myobject: actas: sluggable: fields: [name] builder: array('textutility', 'normalize') columns: name: string(255)
and added utility class lib folder of project (although tried lib folder of app) according instructions found in forum:
<?php //lib/textutility.class.php class textutility { public static function normalize($str) { /* ... */ return $str; } } ?>
when run symfony doctrine:build --all
i'm greeted following error:
warning: call_user_func_array() expects parameter 1 valid callback, function 'array('textutility', 'normalize')' not found or invalid function name in /symfony/lib/plugins/sfdoctrineplugin/lib/vendor/doctrine/doctrine/template/listener/sluggable.php on line 171
i assume i'm putting utility in wrong place , it's not being loaded when needed. putting in wrong place? doctrine's documentation doesn't seem mention subject, unless i'm looking @ wrong page.
arrays in yaml defined other way:
myobject: actas: sluggable: builder: [textutility, normalize]
Comments
Post a Comment