<?php
namespace SabaiApps\Directories\Component\Membership\Controller;

use SabaiApps\Directories\Controller;
use SabaiApps\Directories\Context;

class Membership extends Controller {

	protected function _doExecute( Context $context ) {
		if ( $this->getUser()->isAdministrator() ) {
			$context->content = '<div class="' . DRTS_BS_PREFIX . 'alert ' . DRTS_BS_PREFIX . 'alert-warning">'
				. __( 'An administrator account does not require any membership.', 'directories-pro' ) . '</div>';
			return;
		}

		$context->addTemplate( 'view_entity' )
			->setAttributes(
				array(
					'display' => 'membership_membership',
				)
			);
	}
}
