sms = $hooks->wrap( $sms ); $this->settings = $hooks->wrap( $settings ); $this->post = $hooks->wrap( $post ); $this->uriAction = $uriAction; $this->uri = $uri; $this->layout = $layout; $this->request = $request; $this->self = $hooks->wrap( $this ); } public function breadcrumbs() { $ret = array(); $ret['admin'] = array( 'admin', '__Administration__' ); return $ret; } public function header() { $ret = '__Reminders__'; return $ret; } public function menu() { $ret = array(); $ret['templates'] = array( 'admin/reminders/templates', '__Edit Templates__' ); $ret['review'] = array( 'admin/reminders/review', '__Review Reminders__' ); $ret['sms'] = array( 'admin/reminders/sms', '__SMS__' ); return $ret; } public function post() { $take = array( 'reminders_setup', 'reminders_daily', 'reminders_weekly', 'reminders_monthly', 'reminders_include', ); if( $this->sms->isEnabled() ){ $take[] = 'reminders_daily_sms'; } foreach( $take as $k ){ $v = $this->post->get($k); $this->settings->set( $k, $v ); } $return = array( 'admin/reminders', '__Settings Updated__' ); return $return; } public function render() { $values = array(); $pnames = array( 'reminders_setup', 'reminders_daily', 'reminders_weekly', 'reminders_monthly', 'reminders_include', ); if( $this->sms->isEnabled() ){ $pnames[] = 'reminders_daily_sms'; } foreach( $pnames as $pname ){ $values[$pname] = $this->settings->get($pname); } // cron link $cronParams = array(); $cronSlug = 'cron'; // $cronLink = $this->uriAction->makeUrl( array($cronSlug, $cronParams) ); $cronLink = site_url( '/?hcs=sh4&hca=' . $cronSlug ); // post to $slug = $this->request->getSlug(); $to = $this->uri->makeUrl( $slug ); ob_start(); ?>
layout ->setContent( $ret ) ->setHeader( $this->self->header() ) ->setMenu( $this->self->menu() ) ->setBreadcrumb( $this->self->breadcrumbs() ) ; $ret = $this->layout->render(); return $ret; } }