Source of file TestimonialPage.php
Size: 1,299 Bytes - Last Modified: 2021-12-23T10:51:36+00:00
/var/www/docs.ssmods.com/process/src/code/Pages/TestimonialPage.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 | <?php class TestimonialPage extends Page { /** * Static vars * ----------------------------------*/ /** * Object vars * ----------------------------------*/ /** * Static methods * ----------------------------------*/ /** * Data model * ----------------------------------*/ private static $db = array ( ); private static $has_one = array ( ); private static $has_many = array ( ); /** * Common methods * ----------------------------------*/ /** * Accessor methods * ----------------------------------*/ /** * Controller actions * ----------------------------------*/ /** * Template accessors * ----------------------------------*/ public function Testimonials() { $Testimonials = Testimonial::get(); return $Testimonials->count() ? $Testimonials : false; } public function TeamMembers() { $team = Member::get()->filterByCallback( function($item){ return $item->inGroup('team-member'); } ); return $team->count() ? $team : false; } /** * Object methods * ----------------------------------*/ } class TestimonialPage_Controller extends Page_Controller { private static $allowed_actions = array ( ); public function init() { parent::init(); } } |