[TYPO3-mvc] More DAM questions

Michael Mcmanus michaelorionmcmanus at gmail.com
Tue Apr 6 17:12:32 CEST 2010


Hi All,

I'm beginning to write a couple of simple of extensions in order to 
learn extbase. I've hit my first wall and I'm hoping that some here 
might be able to give me a hand. At the present moment, I'm simply 
trying to understand how to create a model based on an existing table 
like the DAM. To do this, I've modified the logo attribute in the 
BlogExample module to be tied to a DAM record. Here's what I've done:

1) In the TCA I've setup 'logo' to be of the type group:

'config' => array (
				'type' => 'group',	
				'internal_type' => 'db',	
				'allowed' => 'tx_dam',	
				'size' => 1,	
				'minitems' => 0,
				'maxitems' => 1,	
			)

2) I've made a very simple model. At the moment all it has is a getter 
and setter for the property 'filepath'

3) I've added the following chunk of TS to setup:

plugin.tx_blogexample {
	persistence {
		classes {
			Tx_BlogExample_Domain_Model_Logo {
				mapping {
					tableName = tx_dam
				}
			}
		}
	}
}

4) I've made all the appropriate adjustment to the Blog model in order 
to get the Logo, i.e.

	/**
	 * The blog's logo
	 *
	 * @var Tx_BlogExample_Domain_Model_Logo
	 */
	protected $logo;

Needless to say, I'm not getting the output I expect, and am not sure I 
understand what I am doing wrong.

I've looked at a few other topics here on the list that deal with DAM 
integration, but it seems like it's been a while since the question has 
come up.

For starters, is the ts snippet above correct for what I'm after? 
Second, is there a problem with my TCA set-up?

Thanks in advance for any help or suggestions.

- Michael



More information about the TYPO3-project-typo3v4mvc mailing list