Source of file TestimonialsHolderPage.php
Size: 0,802 Bytes - Last Modified: 2021-12-23T10:11:29+00:00
/var/www/docs.ssmods.com/process/src/code/TestimonialsHolderPage.php
1234567891011121314151617181920212223242526272829303132333435 | <?php class TestimonialsHolderPage extends Page { public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab("Root.Testimonials", GridField::create("Testimonials", "Testimonials", Testimonial::get(), GridFieldConfig_RecordEditor::create() ) ); return $fields; } } class TestimonialsHolderPage_Controller extends Page_Controller { public function getTestimonials() { return Testimonial::get(); } public function PaginatedTestimonials($page_length = 10) { $list = PaginatedList::create( $this->getTestimonials(), $this->request ); $list->setPageLength($page_length); return $list; } } |