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   1610 Views

Avatar
Martijn

Community Member, 271 Posts

30 July 2009 at 7:47am

Edited: 30/07/2009 7:49am

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

Forum Moderator, 4096 Posts

31 July 2009 at 1:17am

$manager->setPluralTitle("Foo");

Avatar
Martijn

Community Member, 271 Posts

31 July 2009 at 10:27am

Yeah I found it. Stupid :)

But thanks!