function GroundEditControl(SiteSettings $o_settings) { # set up element $this->SetDataObjectClass('Ground'); $this->o_address_edit = new PostalAddressEditControl(); parent::__construct($o_settings); }
public function __construct(SiteSettings $settings, User $user, AuthenticationManager $authentication_manager) { $this->user = $user; $this->authentication_manager = $authentication_manager; $this->SetDataObjectClass('User'); parent::__construct($settings); }
/** * Creates a new PersonEditControl * * @param SiteSettings $o_settings */ public function __construct(SiteSettings $o_settings) { # set up element $this->SetDataObjectClass('User'); parent::__construct($o_settings); $this->roles_editor = new RelatedIdEditor($this->GetSettings(), $this, "roles", "Roles", array("Role"), "Role", false, "getRoleId", "setRoleId", "setRoleName"); }
/** * Creates a new EditSchoolControl * * @param SiteSettings $settings */ public function __construct(SiteSettings $settings) { # set up element $this->SetDataObjectClass('School'); parent::__construct($settings); $this->is_admin = AuthenticationManager::GetUser()->Permissions()->HasPermission(PermissionType::MANAGE_TEAMS); }
public function __construct(SiteSettings $settings, User $o_person) { $this->o_person = $o_person; $this->SetDataObjectClass('User'); $this->SetButtonText('Reset password'); parent::__construct($settings); }
public function __construct(SiteSettings $settings, CategoryCollection $categories) { # set up element $this->SetDataObjectClass('Competition'); parent::__construct($settings); # store params $this->categories = $categories; }
function CategoryEditControl(SiteSettings $o_settings, CategoryCollection $o_categories) { # check input and store $this->o_categories = $o_categories; # set up element $this->SetDataObjectClass('Category'); parent::__construct($o_settings); }
public function __construct(SiteSettings $settings) { # set up element $this->SetDataObjectClass('Match'); parent::__construct($settings); $this->SetAllowCancel(true); # check permissions $this->b_user_is_match_admin = AuthenticationManager::GetUser()->Permissions()->HasPermission(PermissionType::MANAGE_MATCHES); }
/** * Creates a new TeamEditControl * * @param SiteSettings $settings */ public function __construct(SiteSettings $settings) { # set up element $this->SetDataObjectClass('Team'); parent::__construct($settings); # Set up aggregated editors $this->a_clubs = array(); $this->a_grounds = array(); $this->is_admin = AuthenticationManager::GetUser()->Permissions()->HasPermission(PermissionType::MANAGE_TEAMS); }
/** * Creates a TournamentSeasonsControl * * @param SiteSettings $o_settings * @param Match $match * @param bool $b_entire_form */ public function __construct(SiteSettings $o_settings, Match $match = null, $b_entire_form = true) { $this->SetDataObjectClass('Match'); if (!is_null($match)) { $match->SetMatchType(MatchType::TOURNAMENT); $this->SetDataObject($match); } parent::__construct($o_settings, $b_entire_form); $this->seasons = new Collection(); $this->SetAllowCancel(true); # Change Save button to "Save tournament" $this->SetButtonText('Save tournament'); }
/** * Creates a SeasonEditControl * * @param SiteSettings $o_settings */ public function __construct(SiteSettings $o_settings) { # set up element $this->SetDataObjectClass('Season'); parent::__construct($o_settings); # set up aggregated editors $this->match_types_editor = new RelatedIdEditor($o_settings, $this, 'MatchType', 'Match types', array('Type of match'), 'IdValue', false, 'GetId', 'SetId', 'GetValue'); $this->match_types_editor->SetMinimumItems(1); $this->match_types_editor->SetPossibleDataObjects(array(new IdValue(MatchType::CUP, ucfirst(MatchType::Text(MatchType::CUP))), new IdValue(MatchType::FRIENDLY, ucfirst(MatchType::Text(MatchType::FRIENDLY))), new IdValue(MatchType::LEAGUE, ucfirst(MatchType::Text(MatchType::LEAGUE))), new IdValue(MatchType::PRACTICE, ucfirst(MatchType::Text(MatchType::PRACTICE))), new IdValue(MatchType::TOURNAMENT, ucfirst(MatchType::Text(MatchType::TOURNAMENT))))); #$this->match_types_editor->SetValuesToExclude(array(MatchType::TournamentMatch())); # Tournament match is implied by Tournament $this->adjustments_editor = new PointsAdjustmentsEditor($o_settings, $this, 'Points', 'Points adjustments', array('Points', 'Awarded or deducted', 'Team', 'Reason')); $this->teams_editor = new TeamsInSeasonEditor($o_settings, $this, 'Team', 'Teams', array('Team', 'Withdrawn')); # initialise arrays $this->result_types = array(new MatchResult(MatchResult::HOME_WIN), new MatchResult(MatchResult::AWAY_WIN), new MatchResult(MatchResult::HOME_WIN_BY_FORFEIT), new MatchResult(MatchResult::AWAY_WIN_BY_FORFEIT), new MatchResult(MatchResult::TIE), new MatchResult(MatchResult::POSTPONED), new MatchResult(MatchResult::CANCELLED), new MatchResult(MatchResult::ABANDONED)); }
function __construct($o_settings, $a_addresses) { if (!is_array($a_addresses) or !count($a_addresses)) { die('Must supply at least one contact address for the email form'); } # set up element $this->SetDataObjectClass('Zend_Mail'); $this->SetButtonText('Send email'); $this->a_addresses = $a_addresses; $this->a_addresses_md5 = array(); foreach ($this->a_addresses as $s_addr => $s_text) { $this->a_addresses_md5[md5($s_addr)] = $s_addr; } parent::__construct($o_settings); }
/** * Creates a MatchFixtureEditControl * * @param SiteSettings $o_settings * @param Match $o_match * @param bool $b_entire_form */ public function __construct(SiteSettings $o_settings, Match $o_match = null, $b_entire_form = true) { $this->SetDataObjectClass('Match'); if (!is_null($o_match)) { $this->SetDataObject($o_match); } parent::__construct($o_settings, $b_entire_form); $this->a_teams = array(); $this->a_grounds = array(); $this->SetButtonText('Save match'); $this->i_match_type = MatchType::FRIENDLY; $this->seasons = new Collection(); if (AuthenticationManager::GetUser()->Permissions()->HasPermission(PermissionType::MANAGE_MATCHES)) { $this->b_user_is_admin = true; } }
/** * Creates a new MatchResultEditControl * @param SiteSettings $o_settings * @param Match $o_match * @return void */ public function __construct(SiteSettings $o_settings, Match $o_match = null) { $this->SetDataObjectClass('Match'); $this->SetDataObject($o_match); parent::__construct($o_settings, false); }
/** * Creates a ClubEditControl * @param SiteSettings $settings * @return ClubEditControl */ public function __construct(SiteSettings $settings) { # set up element $this->SetDataObjectClass('Club'); parent::__construct($settings); }
function __construct(SiteSettings $settings) { $this->SetDataObjectClass('Zend_Mail'); $this->SetButtonText('Send email'); parent::__construct($settings); }
/** * Creates a PlayerEditor * @param SiteSettings $settings * @return void */ public function __construct(SiteSettings $settings) { $this->SetDataObjectClass('Player'); parent::__construct($settings); }
/** * Creates a new RoleEditControl * * @param SiteSettings $settings */ public function __construct(SiteSettings $settings) { $this->SetDataObjectClass('Role'); parent::__construct($settings); $this->permissions_editor = new PermissionsEditor($this->GetSettings(), $this, "permissions", "Permissions"); }
/** * Creates a RelatedItemEditor * * @param SiteSettings $settings * @param DataEditControl $controlling_editor * @param string $s_id * @param string $s_title * @param string $a_column_headings */ public function __construct(SiteSettings $settings, DataEditControl $controlling_editor, $s_id, $s_title, $a_column_headings) { # Set up this control parent::__construct($settings, false); $this->SetXhtmlId($s_id); $this->SetNamingPrefix($controlling_editor->GetXhtmlId() . $s_id); $this->SetShowValidationErrors(false); $this->AddCssClass('relatedItemEditor'); $this->AddCssClass(get_class($this)); # Set up the editing table $this->table = new XhtmlTable(); $this->table->SetCaption($s_title); $this->table->SetColumnGroupSizes(array(count($a_column_headings), 1)); $colgroups = $this->table->GetColumnGroups(); $colgroups[count($colgroups) - 1]->SetCssClass('action'); $a_column_headings[] = 'Action'; $o_header = new XhtmlRow($a_column_headings); $o_header->SetIsHeader(true); $this->table->AddRow($o_header); # Initialise variables $this->controlling_editor = $controlling_editor; $this->data_objects = new Collection(); $this->a_rows_posted = array(); }