Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Override pluralTitle in DOM

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1545 Views
  • Martijn
    Avatar
    Community Member
    271 Posts

    Override pluralTitle in DOM Link to this post

    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?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Override pluralTitle in DOM Link to this post

    $manager->setPluralTitle("Foo");

  • Martijn
    Avatar
    Community Member
    271 Posts

    Re: Override pluralTitle in DOM Link to this post

    Yeah I found it. Stupid

    But thanks!

    1545 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.