[TYPO3-mvc] Retrieving the parent of an object while maintainingTCA definition

Christine Gerpheide cgerpheide at gmail.com
Fri Feb 26 19:09:08 CET 2010


Hello list,

I'm facing the following issue: when I add a field for the parent of an
object inside the child, along with the Class type, I get a blank page.
 Specifically, I have an Application which has Projects.  Inside the
Project, I want to add the field Application from which I'll be able to
retrieve EITHER the application object or just the uid.  Inside the TCA I
want to configure the backend so that when you are editing a Project, you
can select the Application it belongs to.  For some reason, these two
requirements are not working together for me, and I just get blank page (no
PHP or extbase exceptions, just blank).

TCA for Project columns:

'application' => array(
'exclude' => 0,
'label'   =>
'LLL:EXT:mdspprojects/Resources/Private/Language/locallang_db.xml:tx_mdspprojects_domain_model_application',
 'config'  => array(
'type' => 'select',
 'foreign_table' => 'tx_mdspprojects_domain_model_application',
// 'foreign_class' => 'Tx_Mdspprojects_Domain_Model_Application', //doesn't
seem to matter
 'minitems' => 0,
'maxitems' => 1,
)
 ),

Project.php:

/**
 * title
 * @var Tx_Mdspprojects_Domain_Model_Application
 */
protected $application;


If I remove the TCA config for that field, the page loads (and I can at
least retrieve the ID of the object), but then my backend record will not
have the Application select field.  This is similar to the blog example...
except that the blog example doesn't have the TCA config I would like.  Has
anyone done this, or know how to achieve this setup?

Thank you,
Christine


More information about the TYPO3-project-typo3v4mvc mailing list