public function bootstrapify() {		
		foreach($this->owner as $f) {

			$sng = Injector::inst()->get($f->class, true, ['dummy', '']);

			if(isset($this->ignores[$f->getName()])) continue;

            // if we have a CompositeField, bootstrapify its children
            if($f instanceof CompositeField) {
                $f->getChildren()->bootstrapify();
                continue;
            }

			// If we have a Tabset, bootstrapify all Tabs
			if($f instanceof TabSet) {
				$f->Tabs()->bootstrapify();
			}

			// If we have a Tab, bootstrapify all its Fields
			if($f instanceof Tab) {
				$f->Fields()->bootstrapify();
			}

			// If the user has customised the holder template already, don't apply the default one.
			if($sng->getFieldHolderTemplate() == $f->getFieldHolderTemplate()) {
				$template = "Bootstrap{$f->class}_holder";			
				if(SSViewer::hasTemplate($template)) {					
					$f->setFieldHolderTemplate($template);				
				}
				else {				
					$f->setFieldHolderTemplate("BootstrapFieldHolder");
				}

			}

			// If the user has customised the field template already, don't apply the default one.
			if($sng->getTemplate() == $f->getTemplate()) {
				foreach(array_reverse(ClassInfo::ancestry($f)) as $className) {						
					$bootstrapCandidate = "Bootstrap{$className}";
					$nativeCandidate = $className;
					if(SSViewer::hasTemplate($bootstrapCandidate)) {
						$f->setTemplate($bootstrapCandidate);
						break;
					}
					elseif(SSViewer::hasTemplate($nativeCandidate)) {
						$f->setTemplate($nativeCandidate);
						break;
					}


				}
			}
		}

		return $this->owner;		
	}
public function bootstrapify() {		
		foreach($this->owner as $f) {

			$sng = Injector::inst()->get($f->class, true, ['dummy', '']);

			if(isset($this->ignores[$f->getName()])) continue;

            // if we have a CompositeField, bootstrapify its children
            if($f instanceof CompositeField) {
                $f->getChildren()->bootstrapify();
                continue;
            }

			// If we have a Tabset, bootstrapify all Tabs
			if($f instanceof TabSet) {
				$f->Tabs()->bootstrapify();
			}

			// If we have a Tab, bootstrapify all its Fields
			if($f instanceof Tab) {
				$f->Fields()->bootstrapify();
			}

			// If the user has customised the holder template already, don't apply the default one.
			if($sng->getFieldHolderTemplate() == $f->getFieldHolderTemplate()) {
				$template = "Bootstrap{$f->class}_holder";			
				if(SSViewer::hasTemplate($template)) {					
					$f->setFieldHolderTemplate($template);				
				}
				else {				
					$f->setFieldHolderTemplate("BootstrapFieldHolder");
				}

			}

			// If the user has customised the field template already, don't apply the default one.
			if($sng->getTemplate() == $f->getTemplate()) {
				foreach(array_reverse(ClassInfo::ancestry($f)) as $className) {						
					$bootstrapCandidate = "Bootstrap{$className}";
					$nativeCandidate = $className;
					if(SSViewer::hasTemplate($bootstrapCandidate)) {
						$f->setTemplate($bootstrapCandidate);
						break;
					}
					elseif(SSViewer::hasTemplate($nativeCandidate)) {
						$f->setTemplate($nativeCandidate);
						break;
					}


				}
			}
		}

		return $this->owner;		
	}
public function bootstrapify ( ) { foreach ( $ this -> owner as $ f ) { $ sng = Injector :: inst ( ) -> get ( $ f -> class , true , [ 'dummy' , '' ] ) ; if ( isset ( $ this -> ignores [ $ f -> getName ( ) ] ) ) continue ; // if we have a CompositeField, bootstrapify its children if ( $ f instanceof CompositeField ) { $ f -> getChildren ( ) -> bootstrapify ( ) ; continue ; } // If we have a Tabset, bootstrapify all Tabs if ( $ f instanceof TabSet ) { $ f -> Tabs ( ) -> bootstrapify ( ) ; } // If we have a Tab, bootstrapify all its Fields if ( $ f instanceof Tab ) { $ f -> Fields ( ) -> bootstrapify ( ) ; } // If the user has customised the holder template already, don't apply the default one. if ( $ sng -> getFieldHolderTemplate ( ) == $ f -> getFieldHolderTemplate ( ) ) { $ template = "Bootstrap{$f->class}_holder" ; if ( SSViewer :: hasTemplate ( $ template ) ) { $ f -> setFieldHolderTemplate ( $ template ) ; } else { $ f -> setFieldHolderTemplate ( "BootstrapFieldHolder" ) ; } } // If the user has customised the field template already, don't apply the default one. if ( $ sng -> getTemplate ( ) == $ f -> getTemplate ( ) ) { foreach ( array_reverse ( ClassInfo :: ancestry ( $ f ) ) as $ className ) { $ bootstrapCandidate = "Bootstrap{$className}" ; $ nativeCandidate = $ className ; if ( SSViewer :: hasTemplate ( $ bootstrapCandidate ) ) { $ f -> setTemplate ( $ bootstrapCandidate ) ; break ; } elseif ( SSViewer :: hasTemplate ( $ nativeCandidate ) ) { $ f -> setTemplate ( $ nativeCandidate ) ; break ; } } } } return $ this -> owner ; }
Transforms all fields in the FieldList to use Bootstrap templates
@return FieldList
Transforms all fields in the FieldList to use Bootstrap templates