hello,
thanks for this great work which is XPDO.
I’m trying to get & set tv for a front end document manager:
I want to retrieve TV value from its name, but I surely do something wrong:
$tv= $xpdo->getObject(’modTemplateVarDocument’, array (’tmplvarid’ =>’1’, ’contentid’=> $docm->get(’id’)));
work well but if I try
$tvdoctag= $xpdo->getObject(’modTemplateVar’, array (’name’ => ’documentTags’));// this don’t work
to retrieve tv value from its name with:
$tv= $xpdo->getObject(’modTemplateVarDocument’, array (’tmplvarid’ =>$tvdoctag->get(’id’), ’contentid’=> $docm->get(’id’)));
it won’t work:
Fatal error: Class ’modElement’ not found in /media/hda7/www/local/xpdo/om/modx096/modtemplatevar.class.php on line 2
my schema (which I retrieve from
noddy’s guide) for modtemplatevar is:
...
<object class="modTemplateVar" table="site_tmplvars" extends="modElement">
<field key="type" dbtype="varchar" precision="20" phptype="string" null="false" default="" />
<field key="name" dbtype="varchar" precision="50" phptype="string" null="false" default="" />
...
<field key="default_text" dbtype="text" phptype="string" null="false" default="" />
<aggregate class="modCategory" key="id" local="category" foreign="id" cardinality="one" />
<composite class="modTemplateVarTemplate" key="id" local="tmplvarid" foreign="id" cardinality="many" />
<composite class="modTemplateVarDocument" key="id" local="tmplvarid" foreign="id" cardinality="one" />
<composite class="modTemplateVarDocumentGroup" key="id" local="tmplvarid" foreign="id" cardinality="many" />
</object>
...
I have read the migration guide but don’t know/understand if it is the problem. I’m totally noob with XPDO and my skill with php is not the best one.