[TYPO3-project-formidable] debug tips

Jerome Schneider j.schneider at ameos.com
Wed May 23 14:48:00 CEST 2007


Hello :)

Try:

echo $this->_viewMixed($this->oDataHandler->_getListData());

in your php userobj.


And in a *datahandler:DB*, this would have been:

echo $this->_viewMixed($this->oDataHandler->_getStoredData());


Best regards,
Jerome Schneider


Asbjørn Morell a écrit :
> Hello,
> 
> I am having a hard time figuring out what objects and classes that are 
> available doing execution. Do you know a way of dumping all available 
> objects, classes and variables? I don't know the name of the objects. 
> Let me give you an example: I have this BUTTON where I would like to 
> check for each row if a user owns it (just need the uid of the row). I 
> tried dump($this->_Oparent) and $aParent = func_get_arg(1); 
> dump($aParent) however I don't get any output.
> 
> Best regards.
> Asbjørn Morell.
> 
> 
> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
> <formidable version="0.7.1">
> 
> <meta>
>  <name>Historique des inscriptions</name>
>  <form formid="tx_ameost3con06_step3" />
>  <displaylabels>false</displaylabels>
>  <debug>true</debug>
> </meta>
> 
> <control>
> 
>  <datahandler:LISTER>
> 
>   <tablename>tx_myart_images</tablename>
>   <keyname>uid</keyname>
>   <labelname>images</labelname>
> 
>   <search>
>    <sql>
>     <query>
> 
>      <userobj>
>       <php><![CDATA[
> 
>       $uid = t3lib_div::_GP('uid');
> 
>       return "
> 
>       SELECT
>       *
>       FROM
>         tx_myart_art
>         INNER JOIN tx_myart_art_image_mm ON (tx_myart_art.uid = 
> tx_myart_art_image_mm.uid_local)
>         INNER JOIN tx_myart_images ON (tx_myart_art_image_mm.uid_foreign 
> = tx_myart_images.uid)
>       WHERE
>         tx_myart_art.uid = $uid
> 
>         ";
> 
>       ]]></php>
>      </userobj>
>     </query>
>    </sql>
>   </search>
> 
>   <pager>
>    <rows>
>     <perpage>10</perpage>
>     <alternate>###ROW1###</alternate>
>    </rows>
>    <nav>
>     <window>7</window>
>    </nav>
>   </pager>
> 
>   <template>
>     <path>EXT:myart/pi1/templates/images/list.html</path>
>     <subpart>###IMAGE_LIST###</subpart>
>   </template>
> 
>  </datahandler:LISTER>
> 
>  <renderer:STANDARD></renderer:STANDARD>
> 
> </control>
> 
> <elements>
> 
>  <renderer:TEMPLATE>
>   <template>
>     <path>EXT:myart/pi1/templates/images/list.html</path>
>     <subpart>###IMAGE_LIST###</subpart>
>   </template>
>  </renderer:TEMPLATE>
> 
>     <renderlet:BUTTON name="link_delete" label="Delete" 
> custom="class='bouton'">
>         <onclick runat="server">
>             <userobj>
>                 <php><![CDATA[
>        // and you do here your delete action
>                 ]]></php>
>             </userobj>
>         </onclick>
>         <process>
>             <userobj>
>                 <php><![CDATA[
> 
> 
>        //how do I access the raw data? need to cheack if image belongs 
> to the logged in user.
> 
>     if (1) {
>      return true;
>     } else {
>      return false;
>      }
>                     // return true or false depending on your rights
>                     // this will make the button not on the page
>                     // (not only hidden)
>                 ]]></php>
>             </userobj>
>         </process>
>     </renderlet:BUTTON>
> 
> </elements>
> 
> </formidable>


More information about the TYPO3-project-formidable mailing list