dmBridge PHP API
DMCPBasicSettingsForm.php
00001 <?php
00002 #
00003 # dmBridge: a data access framework for CONTENTdm(R)
00004 #
00005 # Copyright © 2009, 2010, 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00013 class DMCPBasicSettingsForm extends DMAbstractForm {
00014 
00015    protected function init() {
00016       $f = new DMTextField('institution_name');
00017       $f->addAttribute('id', 'institution_name');
00018       $f->addAttribute('style', 'width:98%');
00019       $f->setMinLength(2);
00020       $f->setMaxLength(100);
00021       $f->setLabel('Institution name');
00022       $this->addField($f);
00023    }
00024 
00025    protected function loadFromDataStore() {
00026       $this->getFieldByName('institution_name')->setValue(
00027          DMConfigXML::getInstance()->getInstitutionName());
00028    }
00029 
00030    public function doAction() {
00031       DMConfigXML::getInstance()->setInstitutionName(
00032          $this->getFieldByName('institution_name')->getValue());
00033       DMConfigXML::getInstance()->save();
00034    }
00035 
00036 }
00037 
 All Data Structures Functions Variables