Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Override pluralTitle in DOM


Reply

3 Posts   1571 Views

Avatar
Martijn

30 July 2009 at 7:47am (Last edited: 30 July 2009 7:49am), Community Member, 271 Posts

Hi,

I tried several variations in my DataObject wich calls DOM, to change the $pluralTitle.

Although there is a function:

public function PluralTitle()
   {
      return $this->pluralTitle ? $this->pluralTitle : $this->AddTitle()."en";
   }

It always take the AddTitle to generate a plural name.
It is posible to change the AddTitle with:

class MyDataObject extends DataObject {
static $singular_name = 'singular_name';
}

in my DataObject, but I found no way to alter the plural_name in the same way like eg:

static $plural_name = 'plural_name';

What am i missing?

Avatar
UncleCheese

31 July 2009 at 1:17am 4085 Posts

$manager->setPluralTitle("Foo");

Avatar
Martijn

31 July 2009 at 10:27am Community Member, 271 Posts

Yeah I found it. Stupid :)

But thanks!