1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
<?php
/*
* $LastChangedDate: 2010-04-14 03:44:57 +0200 (Wed, 14 Apr 2010) $
* $Rev: 1550 $
* $Id: Recruiters.php 1550 2010-04-14 01:44:57Z goran $
*/
class Https_Institution_Get_Recruiters extends Subject implements IBuilder, IXHTMLable
{
/**
* Holds atom signature
*
* @var string
*/
private $atom = '';
/**
* Holds mode in which profile is opened
*
* @var Https_Institutions_Get_View
*/
private $mode = null;
/**
* Class constructor
*
* @return void
*/
function __construct()
{
parent::__construct();
}
/**
* Implement IBuilder method for this page
*
* @access public
* @return void
*
*/
public function build()
{
$this->setCss();
$this->atom = Request::get()->string('rest', 'view');
$this->checkAccess();
$this->mode->modeBuild($this->atom);
$this->notify();
}
private function checkAccess()
{
$ACObject = new AccessControl_Institution();
$ACObject->setAction(IAccessControl::view);
$ACObject->setAXOValue($this->atom);
if (false === Access::check()->run($ACObject)) :
throw new Exception('Cannot perform action: NOT AUTHORISED.', 2005);
else :
$ACObject->setAction(IAccessControl::update);
if (true === Access::check()->run($ACObject)) :
$this->mode = new Https_Institution_Get_Edit($this->atom);
else :
$this->mode = new Https_Institution_Get_View($this->atom);
endif;
endif;
}
/**
* Gets page specific CSS
*/
public function setCSS()
{
ob_start();
?>
<link rel="stylesheet"
href=":server:/js/dojox/form/resources/FileInput.css?:version:"
type="text/css" />
<?php
$this->css = ob_get_contents();
ob_end_clean();
}
/**
* Implements IBuilder method build() for this page
*
* @access public
* @return void
*/
public function setHeader()
{
}
/**
* Implements IBuilder method for this page
*
* @access public
* @return void
*
*/
public function setFooter()
{
}
/**
* Gets page specific JavaScript
*
* @access private
* @return void
*/
public function setJavaScript()
{
}
/**
* Gets current state of observed class property
*
* @param $variable mixed
*
* @access public
* @return mixed
*/
public function getState($variable)
{
if ("css" === $variable) :
return $this->css;
else :
return $this->mode->getModeState($variable);
endif;
}
/**
* Implements XHTMLable methot toXHTML()
* Renders employers registration page body
*
* @access public
* @return void
*/
public function toXHTML()
{
$this->mode->modeToXHTML();
}
}
?>
|