name);
$registry = ClassRegistry::getInstance();
?>
$value ) {
echo "- ".$value['prompt']."
";
if( isset( $value['foreignKey'] ) ) {
$otherModelObject = $registry->getObject($value['model']);
$displayField = $otherModelObject->getDisplayField();
$displayText = $data[$value['model']][ $displayField ];
echo "- ".$html->linkTo($displayText, '/'.Inflector::underscore($value['controller']).'/show/'.$data[$modelName][ $field ] )."
";
} else {
// this is just a plain old field.
if( isset($data[$modelName][$field]) )
{
echo "- ".$data[$modelName][$field]."
";
} else {
echo "-
";
}
}
}
?>
".$html->linkTo('Edit '.Inflector::humanize($modelName), '/'.$this->viewPath.'/edit/'.$data[$modelName]['id'])."";
echo "- ".$html->linkTo('Delete '.Inflector::humanize($modelName), '/'.$this->viewPath.'/destroy/'.$data[$modelName]['id'])."
";
foreach( $fieldNames as $field=>$value ) {
if( isset( $value['foreignKey'] ) )
{
echo "- ".$html->linkTo( "View ".Inflector::humanize($value['controller']), "/".Inflector::underscore($value['controller'])."/show/".$data[Inflector::singularize($params['controller'])][$field] )."
";
}
}
?>
getObject($modelName);
foreach( $objModel->_oneToMany as $relation )
{
$count = 0;
list($table, $field, $value) = $relation;
$otherModelName = Inflector::singularize($table);
echo "