public function __construct($options = null) { $tribes = new Tribes(); $tribes_options = $tribes->getTribes(); parent::__construct($options); $this->setAttrib('accept-charset', 'UTF-8'); $this->setName('ironageregion'); $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li'))); $area = new Zend_Form_Element_Text('area'); $area->setLabel('Area: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter an area name.')->setDecorators($decorators); $region = new Zend_Form_Element_Text('region'); $region->setLabel('Region name: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a region name')->setDecorators($decorators); $description = new Pas_Form_Element_RTE('description'); $description->setLabel('Description: ')->setRequired(true)->setAttrib('rows', 5)->setAttrib('cols', 60)->setAttrib('ToolbarSet', 'Finds')->setAttrib('Height', 250)->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars')); $tribe = new Zend_Form_Element_Select('tribe'); $tribe->setLabel('Associated tribe: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultioptions(array(NULL => NULL, 'Choose a tribe' => $tribes_options))->addValidator('inArray', false, array(array_keys($tribes_options)))->addErrorMessage('You must enter a tribe from the dropdown.')->addValidator('Int')->addErrorMessage('You must enter a tribe.')->setDecorators($decorators); $valid = new Zend_Form_Element_Checkbox('valid'); $valid->setLabel('Is this area valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addErrorMessage('You must set the validity')->setDecorators($decorators); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submit')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper'); $this->addElements(array($area, $region, $tribe, $valid, $description, $submit)); $this->addDisplayGroup(array('area', 'region', 'tribe', 'description', 'valid', 'submit'), 'details')->removeDecorator('HtmlTag'); $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->details->removeDecorator('DtDdWrapper'); $this->details->removeDecorator('HtmlTag'); }
/** Setup individual tribe page */ public function tribeAction() { if ($this->_getParam('id', false)) { $id = (int) $this->_getParam('id'); $this->view->id = $id; $tribes = new Tribes(); $this->view->tribes = $tribes->getTribe($id); } else { throw new Pas_Exception_Param($this->_missingParameter); } }
/** The constructor * @access public * @param array $options * @return void */ public function __construct(array $options = null) { $tribes = new Tribes(); $tribes_options = $tribes->getTribes(); parent::__construct($options); $this->setAttrib('accept-charset', 'UTF-8'); $this->setName('ironageregion'); $area = new Zend_Form_Element_Text('area'); $area->setLabel('Area: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter an area name.'); $region = new Zend_Form_Element_Text('region'); $region->setLabel('Region name: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a region name'); $description = new Pas_Form_Element_CKEditor('description'); $description->setLabel('Description: ')->setRequired(true)->setAttrib('rows', 5)->setAttrib('cols', 60)->setAttrib('ToolbarSet', 'Finds')->setAttrib('Height', 250)->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars')); $tribe = new Zend_Form_Element_Select('tribe'); $tribe->setLabel('Associated tribe: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultioptions(array(null => 'Choose a tribe', 'Available tribes' => $tribes_options))->addValidator('inArray', false, array(array_keys($tribes_options)))->addErrorMessage('You must enter a tribe from the dropdown.')->addValidator('Int')->addErrorMessage('You must enter a tribe.'); $valid = new Zend_Form_Element_Checkbox('valid'); $valid->setLabel('Is this area valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addErrorMessage('You must set the validity'); $submit = new Zend_Form_Element_Submit('submit'); $this->addElements(array($area, $region, $tribe, $valid, $description, $submit)); $this->addDisplayGroup(array('area', 'region', 'tribe', 'description', 'valid', 'submit'), 'details'); parent::init(); }
public function __construct($options = null) { //Get data to form select menu for primary and secondary material $primaries = new Materials(); $primary_options = $primaries->getPrimaries(); //Get data to form select menu for periods //Get Rally data $rallies = new Rallies(); $rally_options = $rallies->getRallies(); //Get Hoard data $hoards = new Hoards(); $hoard_options = $hoards->getHoards(); $counties = new Counties(); $county_options = $counties->getCountyName2(); $denominations = new Denominations(); $denom_options = $denominations->getOptionsIronAge(); $rulers = new Rulers(); $ruler_options = $rulers->getIronAgeRulers(); $mints = new Mints(); $mint_options = $mints->getIronAgeMints(); $axis = new Dieaxes(); $axis_options = $axis->getAxes(); $geog = new Geography(); $geog_options = $geog->getIronAgeGeographyDD(); $regions = new Regions(); $region_options = $regions->getRegionName(); $tribes = new Tribes(); $tribe_options = $tribes->getTribes(); $institutions = new Institutions(); $inst_options = $institutions->getInsts(); parent::__construct($options); $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li'))); $this->setName('Advanced'); $old_findID = new Zend_Form_Element_Text('old_findID'); $old_findID->setLabel('Find number: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid number!')->setDecorators($decorators); $description = new Zend_Form_Element_Text('description'); $description->setLabel('Object description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators); $workflow = new Zend_Form_Element_Select('workflow'); $workflow->setLabel('Workflow stage: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); if (in_array($this->getRole(), $this->_higherlevel)) { $workflow->addMultiOptions(array(NULL => 'Choose a workflow stage', 'Available workflow stages' => array('1' => 'Quarantine', '2' => 'On review', '4' => 'Awaiting validation', '3' => 'Published'))); } if (in_array($this->getRole(), $this->_restricted)) { $workflow->addMultiOptions(array(NULL => 'Choose a workflow stage', 'Available workflow stages' => array('4' => 'Awaiting validation', '3' => 'Published'))); } //Rally details $rally = new Zend_Form_Element_Checkbox('rally'); $rally->setLabel('Rally find: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setUncheckedValue(NULL)->setDecorators($decorators); $geographyID = new Zend_Form_Element_Select('geographyID'); $geographyID->setLabel('Geographic area: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a geography', 'Available geographies' => $geog_options))->addValidator('inArray', false, array(array_keys($geog_options)))->addValidator('Int'); $rallyID = new Zend_Form_Element_Select('rallyID'); $rallyID->setLabel('Found at this rally: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a rally', 'Available rallies' => $rally_options))->setDecorators($decorators)->addValidator('inArray', false, array(array_keys($rally_options)))->addValidator('Int'); $hoard = new Zend_Form_Element_Checkbox('hoard'); $hoard->setLabel('Hoard find: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setUncheckedValue(NULL)->setDecorators($decorators); $hoardID = new Zend_Form_Element_Select('hID'); $hoardID->setLabel('Part of this hoard: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a hoard', 'Available hoards' => $hoard_options))->setDecorators($decorators)->addValidator('inArray', false, array(array_keys($hoard_options)))->addValidator('Int'); $county = new Zend_Form_Element_Select('county'); $county->setLabel('County: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a county', 'Available counties' => $county_options))->addValidator('inArray', false, array(array_keys($county_options)))->setDecorators($decorators); $district = new Zend_Form_Element_Select('district'); $district->setLabel('District: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose district after county'))->setDecorators($decorators)->disabled = true; $parish = new Zend_Form_Element_Select('parish'); $parish->setLabel('Parish: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose parish after county'))->setDecorators($decorators)->disabled = true; $regionID = new Zend_Form_Element_Select('regionID'); $regionID->setLabel('European region: ')->setDecorators($decorators)->addMultiOptions(array(NULL => 'Choose a region for a wide result', 'Available regions' => $region_options))->addValidator('Int'); $gridref = new Zend_Form_Element_Text('gridref'); $gridref->setLabel('Grid reference: ')->setDecorators($decorators)->addValidator('ValidGridRef')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum'); $fourFigure = new Zend_Form_Element_Text('fourFigure'); $fourFigure->setLabel('Four figure grid reference: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('ValidGridRef')->addValidator('Alnum'); ### ##Numismatic data ### // Denomination $denomination = new Zend_Form_Element_Select('denomination'); $denomination->setLabel('Denomination: ')->setRegisterInArrayValidator(false)->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose denomination type', 'Available denominations' => $denom_options))->addValidator('inArray', false, array(array_keys($denom_options)))->setDecorators($decorators); //Primary ruler $ruler = new Zend_Form_Element_Select('ruler'); $ruler->setLabel('Ruler / issuer: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose primary ruler', 'Available rulers' => $ruler_options))->addValidator('inArray', false, array(array_keys($denom_options)))->setDecorators($decorators); //Mint $mint = new Zend_Form_Element_Select('mint'); $mint->setLabel('Issuing mint: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose issuing mint', 'Available mints' => $mint_options))->addValidator('inArray', false, array(array_keys($mint_options)))->setDecorators($decorators); //Secondary ruler $ruler2 = new Zend_Form_Element_Select('ruler2'); $ruler2->setLabel('Secondary ruler / issuer: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose secondary ruler', 'Available rulers' => $ruler_options))->addValidator('inArray', false, array(array_keys($ruler_options)))->setDecorators($decorators); //Obverse inscription $obverseinsc = new Zend_Form_Element_Text('obverseLegend'); $obverseinsc->setLabel('Obverse inscription contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators); //Obverse description $obversedesc = new Zend_Form_Element_Text('obverseDescription'); $obversedesc->setLabel('Obverse description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators); //reverse inscription $reverseinsc = new Zend_Form_Element_Text('reverseLegend'); $reverseinsc->setLabel('Reverse inscription contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators); //reverse description $reversedesc = new Zend_Form_Element_Text('reverseDescription'); $reversedesc->setLabel('Reverse description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators); //Die axis $axis = new Zend_Form_Element_Select('axis'); $axis->setLabel('Die axis measurement: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose measurement', 'Available die axes' => $axis_options))->addValidator('inArray', false, array(array_keys($axis_options)))->addErrorMessage('That option is not a valid choice')->addValidator('Int')->setDecorators($decorators); //Tribe $tribe = new Zend_Form_Element_Select('tribe'); $tribe->setLabel('Iron Age tribe: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a tribe', 'Available tribes' => $tribe_options))->addValidator('inArray', false, array(array_keys($tribe_options)))->addErrorMessage('That option is not a valid choice')->addValidator('Int')->setDecorators($decorators); $objecttype = new Zend_Form_Element_Hidden('objecttype'); $objecttype->setValue('COIN')->setAttrib('class', 'none')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alpha', false, array('allowWhiteSpace' => true))->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label'); $broadperiod = new Zend_Form_Element_Hidden('broadperiod'); $broadperiod->setValue('IRON AGE')->addValidator('Alnum', false, array('allowWhiteSpace' => true))->setAttrib('class', 'none')->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label'); $mack_type = new Zend_Form_Element_Text('mackType'); $mack_type->setLabel('Mack Type: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $bmc_type = new Zend_Form_Element_Text('bmc'); $bmc_type->setLabel('British Museum catalogue number: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $allen_type = new Zend_Form_Element_Text('allenType'); $allen_type->setLabel('Allen Type: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $va_type = new Zend_Form_Element_Text('vaType'); $va_type->setLabel('Van Arsdell Number: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $rudd_type = new Zend_Form_Element_Text('ruddType'); $rudd_type->setLabel('Ancient British Coinage number: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $phase_date_1 = new Zend_Form_Element_Text('phase_date_1'); $phase_date_1->setLabel('Phase date 1: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $phase_date_2 = new Zend_Form_Element_Text('phase_date_2'); $phase_date_2->setLabel('Phase date 2: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $context = new Zend_Form_Element_Text('context'); $context->setLabel('Context of coins: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $depositionDate = new Zend_Form_Element_Text('depositionDate'); $depositionDate->setLabel('Date of deposition: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $numChiab = new Zend_Form_Element_Text('numChiab'); $numChiab->setLabel('Coin hoards of Iron Age Britain number: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); //Submit button $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submit')->setAttrib('class', 'large')->setLabel('Submit your search...'); $institution = new Zend_Form_Element_Select('institution'); $institution->setLabel('Recording institution: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose institution' => $inst_options))->setDecorators($decorators); $hash = new Zend_Form_Element_Hash('csrf'); $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800); $this->addElement($hash); $this->addElements(array($old_findID, $description, $workflow, $rally, $rallyID, $hoard, $hoardID, $county, $regionID, $district, $parish, $fourFigure, $gridref, $denomination, $ruler, $mint, $axis, $obverseinsc, $obversedesc, $reverseinsc, $reversedesc, $ruler2, $tribe, $objecttype, $broadperiod, $geographyID, $bmc_type, $mack_type, $allen_type, $va_type, $rudd_type, $numChiab, $context, $depositionDate, $phase_date_1, $phase_date_2, $submit, $institution)); $this->addDisplayGroup(array('denomination', 'geographyID', 'ruler', 'ruler2', 'tribe', 'mint', 'axis', 'obverseLegend', 'obverseDescription', 'reverseLegend', 'reverseDescription', 'bmc', 'vaType', 'allenType', 'ruddType', 'mackType', 'numChiab', 'context', 'phase_date_1', 'phase_date_2', 'depositionDate'), 'numismatics')->removeDecorator('HtmlTag'); $this->numismatics->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->numismatics->removeDecorator('DtDdWrapper'); $this->numismatics->setLegend('Numismatic details: '); $this->addDisplayGroup(array('old_findID', 'description', 'rally', 'rallyID', 'hoard', 'hID', 'workflow'), 'details')->removeDecorator('HtmlTag'); $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->details->removeDecorator('DtDdWrapper'); $this->details->setLegend('Object details: '); $this->addDisplayGroup(array('county', 'regionID', 'district', 'parish', 'gridref', 'fourFigure', 'institution'), 'spatial')->removeDecorator('HtmlTag'); $this->spatial->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->spatial->removeDecorator('DtDdWrapper'); $this->spatial->setLegend('Spatial details: '); $this->addDisplayGroup(array('submit'), 'submit'); $this->submit->removeDecorator('DtDdWrapper'); $this->submit->removeDecorator('HtmlTag'); }
public function iatriberegionAction() { if ($this->_getParam('term', false)) { $tribes = new Tribes(); $response = $tribes->getIronAgeTribeRegion($this->_getParam('term')); } else { $response = array(array('id' => NULL, 'term' => 'No region specified')); } echo Zend_Json::encode($response); }
/** The configuration * @access public * @return void */ public function configurationAction() { $content = new Content(); $this->view->conservation = $content->getConservationNotes(); $this->view->treasure = $content->getTreasureContent(); $denoms = new Denominations(); $this->view->romanDenoms = $denoms->getDenominationsSitemap('21'); $this->view->ironageDenoms = $denoms->getDenominationsSitemap('16'); $this->view->earlymedDenoms = $denoms->getDenominationsSitemap('47'); $this->view->medievalDenoms = $denoms->getDenominationsSitemap('29'); $this->view->byzantineDenoms = $denoms->getDenominationsSitemap('67'); $this->view->greekDenoms = $denoms->getDenominationsSitemap('66'); $this->view->postMedDenoms = $denoms->getDenominationsSitemap('36'); $emperors = new Emperors(); $this->view->emperors = $emperors->getEmperorsSiteMap(); $rulers = new Rulers(); $this->view->medrulers = $rulers->getMedievalRulersList(); $this->view->earlymedrulers = $rulers->getEarlyMedievalRulersList(); $this->view->postmedrulers = $rulers->getPostMedievalRulersList(); $this->view->ironagerulers = $rulers->getIARulersList(); $this->view->byzantinerulers = $rulers->getByzRulersList(); $this->view->greekrulers = $rulers->getGreekRulersList(); $mints = new Mints(); $this->view->romanMints = $mints->getMintsSiteMap(21); $this->view->ironageMints = $mints->getMintsSiteMap(16); $this->view->byzantineMints = $mints->getMintsSiteMap(67); $this->view->earlymedMints = $mints->getMintsSiteMap(47); $this->view->medMints = $mints->getMintsSiteMap(29); $this->view->postmedMints = $mints->getMintsSiteMap(36); $this->view->greekMints = $mints->getMintsSiteMap(66); $reeces = new Reeces(); $this->view->reeces = $reeces->getSiteMap(); $types = new MedievalTypes(); $this->view->medtypes = $types->getTypesSiteMap(29); $this->view->postmedtypes = $types->getTypesSiteMap(36); $this->view->earlymedtypes = $types->getTypesSiteMap(47); $cats = new CategoriesCoins(); $this->view->medcats = $cats->getCatsSiteMap(29); $this->view->earlymedcats = $cats->getCatsSiteMap(47); $this->view->postmedcats = $cats->getCatsSiteMap(36); $tribes = new Tribes(); $this->view->tribes = $tribes->getSitemap(); $news = new News(); $this->view->news = $news->getSitemapNews(); }
public function __construct($options = null) { // Construct the select menu data $denominations = new Denominations(); $denomination_options = $denominations->getOptionsIronAge(); $statuses = new Statuses(); $status_options = $statuses->getCoinStatus(); $dies = new Dieaxes(); $die_options = $dies->getAxes(); $wears = new Weartypes(); $wear_options = $wears->getWears(); $rulers = new Rulers(); $ro = $rulers->getIronAgeRulers(); $mints = new Mints(); $mint_options = $mints->getIronAgeMints(); $tribes = new Tribes(); $to = $tribes->getTribes(); $atypes = new AllenTypes(); $atypelist = $atypes->getATypes(); $vatypes = new VanArsdellTypes(); $vatypelist = $vatypes->getVATypesDD(); $macktypes = new MackTypes(); $macktypelist = $macktypes->getMackTypesDD(); parent::__construct($options); $this->setAttrib('accept-charset', 'UTF-8'); $this->addPrefixPath('Pas_Form_Decorator', 'Pas/Form/Decorator/', 'decorator'); $this->addPrefixPath('Pas_Form_Element', 'Pas/Form/Element/', 'element'); $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li'))); $this->setName('ironagecoin'); $denomination = new Zend_Form_Element_Select('denomination'); $denomination->setLabel('Denomination: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose denomination' => $denomination_options))->addValidator('InArray', false, array(array_keys($denomination_options)))->addValidator('Int')->setDecorators($decorators); $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier'); $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); $geographyID = new Zend_Form_Element_Select('geographyID'); $geographyID->setLabel('Geographic area: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits'); $geography_qualifier = new Zend_Form_Element_Radio('geography_qualifier'); $geography_qualifier->setLabel('Geographic qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); $ruler_id = new Zend_Form_Element_Select('ruler'); $ruler_id->setLabel('Ruler: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addMultiOptions(array(NULL => 'Choose primary ruler', 'Available rulers' => $ro))->addValidator('InArray', false, array(array_keys($ro))); $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier'); $ruler_qualifier->setLabel('Issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); $ruler2_id = new Zend_Form_Element_Select('ruler2_id'); $ruler2_id->setLabel('Secondary ruler: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setDecorators($decorators)->addMultiOptions(array(NULL => NULL, 'Choose issuing secondary ruler' => $ro))->addValidator('InArray', false, array(array_keys($denomination_options))); $ruler2_qualifier = new Zend_Form_Element_Radio('ruler2_qualifier'); $ruler2_qualifier->setLabel('Secondary issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); $mint_id = new Zend_Form_Element_Select('mint_id'); $mint_id->setLabel('Issuing mint: ')->setRegisterInArrayValidator(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addMultiOptions(array(NULL => NULL, 'Choose issuing mint' => $mint_options))->setDecorators($decorators)->addValidator('InArray', false, array(array_keys($mint_options))); $tribe = new Zend_Form_Element_Select('tribe'); $tribe->setLabel('Tribe: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setRegisterInArrayValidator(false)->setDecorators($decorators)->addMultiOptions(array(NULL => NULL, 'Choose tribe' => $to))->addValidator('InArray', false, array(array_keys($to))); $tribe_qualifier = new Zend_Form_Element_Radio('tribe_qualifier'); $tribe_qualifier->setLabel('Tribe qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); $status = new Zend_Form_Element_Select('status'); $status->setLabel('Status: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setValue(1)->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $status_options))->setDecorators($decorators)->addValidator('InArray', false, array(array_keys($status_options))); $status_qualifier = new Zend_Form_Element_Radio('status_qualifier'); $status_qualifier->setLabel('Status qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear'); $degree_of_wear->setLabel('Degree of wear: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $wear_options))->setDecorators($decorators)->addValidator('InArray', false, array(array_keys($wear_options))); $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription'); $obverse_inscription->setLabel('Obverse inscription: ')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->setDecorators($decorators); $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription'); $reverse_inscription->setLabel('Reverse inscription: ')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->setDecorators($decorators); $obverse_description = new Zend_Form_Element_Textarea('obverse_description'); $obverse_description->setLabel('Obverse description: ')->setAttrib('rows', 8)->setAttrib('cols', 80)->addFilters(array('StripTags', 'StringTrim', 'BasicHtml', 'EmptyParagraph'))->setAttrib('class', 'expanding'); $reverse_description = new Zend_Form_Element_Textarea('reverse_description'); $reverse_description->setLabel('Reverse description: ')->setAttrib('rows', 8)->setAttrib('cols', 80)->addFilters(array('StripTags', 'StringTrim', 'BasicHtml', 'EmptyParagraph'))->setAttrib('class', 'expanding'); $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement'); $die_axis_measurement->setLabel('Die axis measurement: ')->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $die_options))->setDecorators($decorators)->addValidator('InArray', false, array(array_keys($die_options))); $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty'); $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); $mack_type = new Zend_Form_Element_Select('mack_type'); $mack_type->setLabel('Mack Type: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addMultiOptions(array(NULL => 'Choose a Mack type', 'Valid types' => $macktypelist))->setDecorators($decorators)->setDecorators($decorators)->addValidator('InArray', false, array(array_keys($macktypelist))); $bmc_type = new Zend_Form_Element_Text('bmc_type'); $bmc_type->setLabel('British Museum catalogue number: ')->setDecorators($decorators)->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $allen_type = new Zend_Form_Element_Select('allen_type'); $allen_type->setLabel('Allen Type: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addMultiOptions(array(NULL => 'Choose an Allen type', 'Valid types' => $atypelist))->setDecorators($decorators); $va_type = new Zend_Form_Element_Select('va_type'); $va_type->setLabel('Van Arsdell Number: ')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addMultiOptions(array(NULL => 'Choose Van Arsdell type', 'Valid types' => $vatypelist))->setDecorators($decorators); $cciNumber = new Zend_Form_Element_Text('cciNumber'); $cciNumber->setLabel('Celtic Coin Index Number: ')->setAttrib('size', 12)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->setDescription('This is the coin\'s unique CCI number, not a comparison field!')->setDecorators($decorators); $rudd_type = new Zend_Form_Element_Text('rudd_type'); $rudd_type->setLabel('Ancient British Coinage number: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $phase_date_1 = new Zend_Form_Element_Text('phase_date_1'); $phase_date_1->setLabel('Phase date 1: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $phase_date_2 = new Zend_Form_Element_Text('phase_date_2'); $phase_date_2->setLabel('Phase date 2: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $context = new Zend_Form_Element_Text('context'); $context->setLabel('Context of coins: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $depositionDate = new Zend_Form_Element_Text('depositionDate'); $depositionDate->setLabel('Date of deposition: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Date'); $numChiab = new Zend_Form_Element_Text('numChiab'); $numChiab->setLabel('Coin hoards of Iron Age Britain number: ')->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true)); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setAttrib('class', 'large'); $this->addElements(array($ruler_id, $ruler_qualifier, $denomination, $denomination_qualifier, $mint_id, $ruler2_id, $ruler2_qualifier, $geographyID, $geography_qualifier, $status, $status_qualifier, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $tribe, $tribe_qualifier, $bmc_type, $mack_type, $allen_type, $va_type, $rudd_type, $cciNumber, $numChiab, $context, $depositionDate, $phase_date_1, $phase_date_2, $submit)); $this->addDisplayGroup(array('denomination', 'denomination_qualifier', 'geographyID', 'geography_qualifier', 'tribe', 'tribe_qualifier', 'ruler', 'ruler_qualifier', 'ruler2_id', 'ruler2_qualifier', 'mint_id', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'die_axis_measurement', 'die_axis_certainty', 'bmc_type', 'va_type', 'allen_type', 'rudd_type', 'mack_type', 'cciNumber', 'numChiab', 'context', 'phase_date_1', 'phase_date_2', 'depositionDate'), 'details'); $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->details->removeDecorator('DtDdWrapper'); $this->addDisplayGroup(array('submit'), 'submit'); }
/** The constructor * @access public * @param array $options * @return void */ public function __construct(array $options = null) { // Construct the select menu data $denominations = new Denominations(); $denomination_options = $denominations->getOptionsIronAge(); $statuses = new Statuses(); $status_options = $statuses->getCoinStatus(); $dies = new Dieaxes(); $die_options = $dies->getAxes(); $wears = new WearTypes(); $wear_options = $wears->getWears(); $rulers = new Rulers(); $ro = $rulers->getIronAgeRulers(); $mints = new Mints(); $mint_options = $mints->getIronAgeMints(); $tribes = new Tribes(); $to = $tribes->getTribes(); $atypes = new AllenTypes(); $atypelist = $atypes->getATypes(); $vatypes = new VanArsdellTypes(); $vatypelist = $vatypes->getVATypesDD(); $macktypes = new MackTypes(); $macktypelist = $macktypes->getMackTypesDD(); $abc = new AbcNumbers(); $abclist = $abc->getTerms(); $regions = new Geography(); $ia_geog = $regions->getIronAgeGeographyDD(); parent::__construct($options); $this->setName('ironagecoin'); $denomination = new Zend_Form_Element_Select('denomination'); $denomination->setLabel('Denomination: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose denomination', 'Available options' => $denomination_options))->addValidator('InArray', false, array(array_keys($denomination_options)))->addValidator('Int'); $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier'); $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => '')); $geographyID = new Zend_Form_Element_Select('geographyID'); $geographyID->setLabel('Geographic area: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose geography', 'Available options' => $ia_geog))->addValidator('InArray', false, array(array_keys($ia_geog)))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits'); $geography_qualifier = new Zend_Form_Element_Radio('geography_qualifier'); $geography_qualifier->setLabel('Geographic qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => '')); $ruler_id = new Zend_Form_Element_Select('ruler_id'); $ruler_id->setLabel('Ruler: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addMultiOptions(array(null => 'Choose primary ruler', 'Available rulers' => $ro)); $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier'); $ruler_qualifier->setLabel('Issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => '')); $ruler2_id = new Zend_Form_Element_Select('ruler2_id'); $ruler2_id->setLabel('Secondary ruler: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addMultiOptions(array(null => 'Choose issuing secondary ruler', 'Available rulers' => $ro))->addValidator('InArray', false, array(array_keys($ro))); $ruler2_qualifier = new Zend_Form_Element_Radio('ruler2_qualifier'); $ruler2_qualifier->setLabel('Secondary issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => '')); $mint_id = new Zend_Form_Element_Select('mint_id'); $mint_id->setLabel('Issuing mint: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->setRegisterInArrayValidator(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addMultiOptions(array(null => 'Choose issuing mint', 'Available options' => $mint_options))->addValidator('InArray', false, array(array_keys($mint_options))); $tribe = new Zend_Form_Element_Select('tribe'); $tribe->setLabel('Tribe: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setRegisterInArrayValidator(false)->addMultiOptions(array(null => 'Choose tribe', 'Available options' => $to))->addValidator('InArray', false, array(array_keys($to))); $tribe_qualifier = new Zend_Form_Element_Radio('tribe_qualifier'); $tribe_qualifier->setLabel('Tribe qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => '')); $status = new Zend_Form_Element_Select('status'); $status->setLabel('Status: ')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('Int')->setValue(1)->addMultiOptions(array(null => 'Choose coin status', 'Available options' => $status_options))->addValidator('InArray', false, array(array_keys($status_options))); $status_qualifier = new Zend_Form_Element_Radio('status_qualifier'); $status_qualifier->setLabel('Status qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => '')); $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear'); $degree_of_wear->setLabel('Degree of wear: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addMultiOptions(array(null => 'Choose wear status', 'Available options' => $wear_options))->addValidator('InArray', false, array(array_keys($wear_options))); $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription'); $obverse_inscription->setLabel('Obverse inscription: ')->addFilters(array('StripTags', 'StringTrim'))->setAttribs(array('rows' => 8, 'cols' => 80, 'class' => 'span6')); $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription'); $reverse_inscription->setLabel('Reverse inscription: ')->addFilters(array('StripTags', 'StringTrim'))->setAttribs(array('rows' => 8, 'cols' => 80, 'class' => 'span6')); $obverse_description = new Zend_Form_Element_Textarea('obverse_description'); $obverse_description->setLabel('Obverse description: ')->setAttribs(array('rows' => 8, 'cols' => 80, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim', 'BasicHtml', 'EmptyParagraph')); $reverse_description = new Zend_Form_Element_Textarea('reverse_description'); $reverse_description->setLabel('Reverse description: ')->setAttribs(array('rows' => 8, 'cols' => 80, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim', 'BasicHtml', 'EmptyParagraph')); $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement'); $die_axis_measurement->setLabel('Die axis measurement: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose die axis', 'Available options' => $die_options))->addValidator('InArray', false, array(array_keys($die_options))); $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty'); $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => '')); $mack_type = new Zend_Form_Element_Select('mack_type'); $mack_type->setLabel('Mack Type: ')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose a Mack type', 'Valid types' => $macktypelist))->addValidator('InArray', false, array(array_keys($macktypelist))); $bmc_type = new Zend_Form_Element_Text('bmc_type'); $bmc_type->setLabel('British Museum catalogue number: ')->addFilters(array('StripTags', 'StringTrim', 'Purifier')); $allen_type = new Zend_Form_Element_Select('allen_type'); $allen_type->setLabel('Allen Type: ')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose an Allen type', 'Valid types' => $atypelist))->addValidator('InArray', false, array(array_keys($atypelist))); $va_type = new Zend_Form_Element_Select('va_type'); $va_type->setLabel('Van Arsdell Number: ')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose Van Arsdell type', 'Valid types' => $vatypelist))->addValidator('InArray', false, array(array_keys($vatypelist))); $cciNumber = new Zend_Form_Element_Text('cciNumber'); $cciNumber->setLabel('Celtic Coin Index Number: ')->setAttrib('size', 12)->addFilters(array('StripTags', 'StringTrim'))->setDescription('This is the coin\'s unique CCI number, not a ' . 'comparison field. Numbers are issued by the CCI.'); $rudd_type = new Zend_Form_Element_Select('rudd_type'); $rudd_type->setLabel('Ancient British Coinage number: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim', 'Purifier'))->addMultiOptions(array(null => 'Choose ABC number', 'Valid types' => $abclist))->addValidator('InArray', false, array(array_keys($abclist))); $phase_date_1 = new Zend_Form_Element_Text('phase_date_1'); $phase_date_1->setLabel('Phase date 1: ')->addFilters(array('StripTags', 'StringTrim', 'Purifier')); $phase_date_2 = new Zend_Form_Element_Text('phase_date_2'); $phase_date_2->setLabel('Phase date 2: ')->addFilters(array('StripTags', 'StringTrim', 'Purifier')); $context = new Zend_Form_Element_Text('context'); $context->setLabel('Context of coins: ')->addFilters(array('StripTags', 'StringTrim', 'Purifier')); $depositionDate = new Zend_Form_Element_Text('depositionDate'); $depositionDate->setLabel('Date of deposition: ')->addFilters(array('StripTags', 'StringTrim', 'Purifier')); $numChiab = new Zend_Form_Element_Text('numChiab'); $numChiab->setLabel('Coin hoards of Iron Age Britain number: ')->addFilters(array('StripTags', 'StringTrim', 'Purifier')); $submit = new Zend_Form_Element_Submit('submit'); $this->addElements(array($ruler_id, $ruler_qualifier, $denomination, $denomination_qualifier, $mint_id, $ruler2_id, $ruler2_qualifier, $geographyID, $geography_qualifier, $status, $status_qualifier, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $tribe, $tribe_qualifier, $bmc_type, $mack_type, $allen_type, $va_type, $rudd_type, $cciNumber, $numChiab, $context, $depositionDate, $phase_date_1, $phase_date_2, $submit)); $this->addDisplayGroup(array('denomination', 'denomination_qualifier', 'geographyID', 'geography_qualifier', 'tribe', 'tribe_qualifier', 'ruler_id', 'ruler_qualifier', 'ruler2_id', 'ruler2_qualifier', 'mint_id', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'die_axis_measurement', 'die_axis_certainty', 'bmc_type', 'va_type', 'allen_type', 'rudd_type', 'mack_type', 'cciNumber', 'numChiab', 'context', 'phase_date_1', 'phase_date_2', 'depositionDate'), 'details'); $this->addDisplayGroup(array('submit'), 'buttons'); parent::init(); }
public function SearchParamsUsers($params = NULL) { unset($params['submit']); unset($params['action']); unset($params['controller']); unset($params['module']); if (!is_null($params)) { echo 'You searched for: '; //Objecttype if (array_key_exists('objecttype', $params)) { if (!is_null($params['objecttype'])) { echo 'Object type: ' . $this->view->escape($params['objecttype']) . ' » '; } } //Broadperiod if (array_key_exists('broadperiod', $params)) { if (!is_null($params['broadperiod'])) { echo 'Broadperiod: ' . $this->view->escape($params['broadperiod']) . ' » '; } } //VA type if (array_key_exists('vaType', $params)) { if (!is_null($params['vaType'])) { $va = $params['vaType']; echo 'Van Arsdell Type: ' . $va; } } if (array_key_exists('woeid', $params)) { if (!is_null($params['woeid'])) { $woeid = $params['woeid']; echo 'Where on Earth ID: ' . $woeid; } } if (array_key_exists('recorderID', $params)) { if (!is_null($params['recorderID'])) { $rid = $params['recorderID']; $peoples = new Peoples(); $people = $peoples->fetchRow($peoples->select()->where('secuid = ?', $rid)); echo 'Recorded by: ' . $people->fullname; } } //County if (array_key_exists('county', $params)) { if (!is_null($params['county'])) { echo 'County: ' . $this->view->escape($params['county']) . ' » '; } } //Tribe for IA coins if (array_key_exists('tribe', $params)) { if (!is_null($params['tribe'])) { $tribe = $params['tribe']; $tribes = new Tribes(); $tribe = $tribes->fetchRow($tribes->select()->where('id = ?', (int) $tribe)); echo 'Iron Age Tribe: ' . $tribe->tribe; } } //region if (array_key_exists('regionID', $params)) { if (!is_null($params['regionID'])) { $region = $params['regionID']; $regions = new Regions(); $regions = $regions->getRegion($region); $this->regions = $regions; foreach ($this->regions as $region) { echo 'Region: ' . $this->view->escape($region['region']) . ' » '; } } } if (array_key_exists('material', $params)) { if (!is_null($params['material'])) { $mat = $params['material']; $materials = new Materials(); $materials = $materials->getMaterialName($mat); $this->materials = $materials; foreach ($this->materials as $material) { echo 'Primary material: ' . $this->view->escape($material['term']) . ' » '; } } } if (array_key_exists('parish', $params)) { if (!is_null($params['parish'])) { echo 'Parish: ' . $this->view->escape($params['parish']) . ' » '; } } if (array_key_exists('district', $params)) { if (!is_null($params['district'])) { echo 'District: ' . $this->view->escape($params['district']) . ' » '; } } if (array_key_exists('denomination', $params)) { $denomname = $params['denomination']; $denoms = new Denominations(); $denoms = $denoms->getDenomName($denomname); $this->denoms = $denoms; foreach ($this->denoms as $denom) { echo 'Denomination type: ' . $this->view->escape($denom['denomination']) . ' » '; } } if (array_key_exists('description', $params)) { if (!is_null($params['description'])) { echo 'Description contained: ' . $this->view->escape($params['description']) . ' » '; } } if (array_key_exists('fourFigure', $params)) { if (!is_null($params['fourFigure'])) { echo 'Four figure grid reference: ' . $this->view->escape($params['fourFigure']) . ' » '; } } if (array_key_exists('old_findID', $params)) { if (!is_null($params['old_findID'])) { echo 'Find reference number: ' . $this->view->escape($params['old_findID']) . ' » '; } } if (array_key_exists('fromsubperiod', $params)) { if (!is_null($params['fromsubperiod'])) { $sub = $params['fromsubperiod']; if ($sub == 1) { echo 'Subperiod: Early' . ' » '; } else { if ($sub == 2) { echo 'Subperiod: Middle' . ' » '; } else { if ($sub == 3) { echo 'Subperiod: Late' . ' » '; } } } } } if (array_key_exists('tosubperiod', $params)) { if (!is_null($params['tosubperiod'])) { $sub = $params['tosubperiod']; if ($sub == 1) { echo 'Subperiod: Early' . ' » '; } else { if ($sub == 2) { echo 'Subperiod: Middle' . ' » '; } else { if ($sub == 3) { echo 'Subperiod: Late' . ' » '; } } } } } if (array_key_exists('periodfrom', $params)) { if (!is_null($params['periodfrom'])) { $period = $params['periodfrom']; $periods = new Periods(); $periods = $periods->getPeriodName($period); $this->periods = $periods; foreach ($this->periods as $period) { echo 'Period from: ' . $this->view->escape($period['term']) . ' » '; } } } //Period to key if (array_key_exists('periodto', $params)) { if (!is_null($params['periodto'])) { $period = $params['periodto']; $periods = new Periods(); $periods = $periods->getPeriodName($period); $this->periods = $periods; foreach ($this->periods as $period) { echo 'Period to: ' . $this->view->escape($period['term']) . ' » '; } } } // if (array_key_exists('surface', $params)) { if (!is_null($params['surface'])) { $surfaceterm = $params['surface']; $surfaces = new Surftreatments(); $surfaces = $surfaces->getSurfaceTerm($surfaceterm); $this->surfaces = $surfaces; foreach ($this->surfaces as $surface) { echo 'Surface treatment: ' . $this->view->escape($surface['term']) . ' » '; } } } if (array_key_exists('class', $params)) { if (!is_null($params['class'])) { echo 'Classification term like: ' . $this->view->escape($params['class']) . ' » '; } } //Date from starts if (array_key_exists('from', $params)) { if (!is_null($params['from'])) { $from = $params['from']; $suffix = "BC"; $prefix = "AD"; if ($from < 0) { $date = abs($from) . ' ' . $suffix; } else { if ($from > 0) { $date = $prefix . ' ' . abs($from); } } echo 'Date from greater or equal to: ' . (int) $date . ' » '; } } //Date from ends if (array_key_exists('fromend', $params)) { if (!is_null($params['fromend'])) { $from = $params['fromend']; $suffix = "BC"; $prefix = "AD"; if ($from < 0) { $date = abs($from) . ' ' . $suffix; } else { if ($from > 0) { $date = $prefix . ' ' . abs($from); } } echo 'Date from smaller or equal to: ' . $date . ' » '; } } //Date to starts //Date to ends //Year found if (array_key_exists('discovered', $params)) { if (!is_null($params['discovered'])) { echo 'Year of discovery where known: ' . $this->view->escape($params['discovered']) . ' » '; } } //Found by if (array_key_exists('finder', $params)) { if (!is_null($params['finder'])) { $finder = $params['finder']; $peoples = new Peoples(); $peoples = $peoples->getName($finder); $this->peoples = $peoples; foreach ($this->peoples as $people) { echo 'Item found by: ' . $this->view->escape($people['term']) . ' » '; } } } //Identified by if (array_key_exists('idby', $params)) { if (!is_null($params['idby'])) { $finder = $params['idby']; $peoples = new Peoples(); $peoples = $peoples->getName($finder); $this->peoples = $peoples; foreach ($this->peoples as $people) { echo 'Identified by: ' . $this->view->escape($people['term']) . ' » '; } } } //Recorded by //Identified by if (array_key_exists('recordby', $params)) { if (!is_null($params['recordby'])) { $finder = $params['recordby']; $peoples = new Peoples(); $peoples = $peoples->getName($finder); $this->peoples = $peoples; foreach ($this->peoples as $people) { echo 'Recorded by: ' . $this->view->escape($people['term']) . ' » '; } } } //Issuer if (array_key_exists('ruler', $params)) { if (!is_null($params['ruler'])) { $ruler = $params['ruler']; $rulers = new Rulers(); $rulers = $rulers->getRulersName($ruler); $this->rulers = $rulers; foreach ($this->rulers as $ruler) { echo 'Coin issued by: ' . $this->view->escape($ruler['issuer']) . ' » '; } } } if (array_key_exists('note', $params)) { if ($params['note'] == (int) 1) { echo 'Object is a find of note'; } } if (array_key_exists('treasure', $params)) { if ($params['treasure'] == (int) 1) { echo 'Object is Treasure or potential Treasure'; } } if (array_key_exists('TID', $params)) { if (!is_null($params['TID'])) { echo 'Treasure case number: ' . $this->view->escape($params['TID']); } } if (array_key_exists('created', $params)) { if (!is_null($params['created'])) { echo 'Finds entered on: ' . $this->view->escape($params['created']); } } if (array_key_exists('createdBefore', $params)) { if (!is_null($params['createdBefore'])) { echo 'Finds entered on or before: ' . $this->view->niceShortDate($this->view->escape($params['createdBefore'])) . ' » '; } } if (array_key_exists('createdAfter', $params)) { if (!is_null($params['createdAfter'])) { echo 'Finds entered on or after: ' . $this->view->niceShortDate($this->view->escape($params['createdAfter'])) . ' » '; } } if (array_key_exists('hoard', $params)) { if ((int) $params['hoard'] == (int) 1) { echo 'Object is part of a hoard.' . ' » '; } } if (array_key_exists('hID', $params)) { if ((int) $params['hID']) { $hID = $params['hID']; $hIDs = new Hoards(); $hIDsList = $hIDs->getHoardDetails((int) $hID); $this->hids = $hIDsList; foreach ($this->hids as $hid) { echo 'Part of the ' . $this->view->escape($hid['term']) . ' hoard.' . ' » '; } } } if (array_key_exists('otherref', $params)) { if (!is_null($params['otherref'])) { echo 'Other reference: ' . $this->view->escape($params['otherref']); } } //Workflow if (array_key_exists('workflow', $params)) { if (!is_null($params['workflow'])) { $stage = $params['workflow']; $stages = new Workflows(); $stages = $stages->getStageName($stage); $this->stages = $stages; foreach ($this->stages as $stage) { echo 'Workflow stage: ' . $this->view->escape($stage['workflowstage']) . ' » '; } } } if (array_key_exists('manufacture', $params)) { if (!is_null($params['manufacture'])) { $manufacture = $params['manufacture']; $manufactures = new Manufactures(); $manufactures = $manufactures->getManufactureDetails((int) $manufacture); $this->manufactures = $manufactures; foreach ($this->manufactures as $man) { echo 'Manufacture type: ' . $this->view->escape($man['term']) . ' » '; } } } if (array_key_exists('decoration', $params)) { if (!is_null($params['decoration'])) { $decoration = $params['decoration']; $decorations = new Decmethods(); $decorations = $decorations->getDecorationDetails((int) $decoration); $this->decorations = $decorations; foreach ($this->decorations as $dec) { echo 'Decoration type: ' . $this->view->escape($dec['term']) . ' » '; } } } //Mint if (array_key_exists('mint', $params)) { if (!is_null($params['mint'])) { $id = $params['mint']; $mints = new Mints(); $mints = $mints->getMintName($id); $this->mints = $mints; foreach ($this->mints as $mint) { echo 'Mint issuing coins: ' . $this->view->escape($mint['mint_name']) . ' (' . $mint['term'] . ')' . ' » '; } } } //Category if (array_key_exists('category', $params)) { if (!is_null($params['category'])) { $id = $params['category']; $cats = new CategoriesCoins(); $cats = $cats->getCategory($id); $this->cats = $cats; foreach ($this->cats as $cat) { echo 'Coin category: ' . $this->view->escape($cat['term']) . ' » '; } } } if (array_key_exists('reeceID', $params)) { if (!is_null($params['reeceID'])) { $id = $params['reeceID']; $reeces = new Reeces(); $rs = $reeces->getReecePeriodDetail($id); foreach ($rs as $r) { echo 'Reece Period: ' . $this->view->escape($r['period_name']) . ' ' . $r['date_range'] . ' » '; } } } //Workflow if (array_key_exists('createdby', $params)) { if (!is_null($params['createdby'])) { $createdby = $params['createdby']; $users = new Users(); $names = $users->getCreatedBy($createdby); $this->names = $names; foreach ($this->names as $name) { echo 'Record created by: <a href="' . $this->view->baseUrl() . '/contacts/staff/profile/id/' . $name['i'] . '" title="View profile for ' . $name['fullname'] . '">' . $name['fullname'] . '</a>' . ' » '; } } } //End of function echo '</ul>'; } }