libraries/MVC/BController.php
public function field_get($type,$com=''){
		if(empty($com)){
			$fn=BLIBRARIESFRAMEWORKPATH.'mvc'.DIRECTORY_SEPARATOR.'field'.DIRECTORY_SEPARATOR.$type.'.php';
			$class='BControllerField_'.$type;
			} else {
			$fn=BCOMPONENTSAPPLICATIONPATH.$com.DIRECTORY_SEPARATOR.'fields'.DIRECTORY_SEPARATOR.$type.'.php';
			if(!file_exists($fn)){
				$fn=BCOMPONENTSFRAMEWORKPATH.$com.DIRECTORY_SEPARATOR.'fields'.DIRECTORY_SEPARATOR.$type.'.php';
				}
			$class='BControllerField_'.$com.'_'.$type;
			}
		if(!file_exists($fn)){
			if(DEBUG_MODE){
				BDebug::error('File "'.$fn.'" does not exist! type='.$type.', com='.$com);
				}
			return NULL;
			}
		require_once($fn);
		$field=new $class;
		$field->controller=$this;
		$field->com=$com;
		return $field;
		}
public function field_get($type,$com=''){
		if(empty($com)){
			$fn=BLIBRARIESFRAMEWORKPATH.'mvc'.DIRECTORY_SEPARATOR.'field'.DIRECTORY_SEPARATOR.$type.'.php';
			$class='BControllerField_'.$type;
			} else {
			$fn=BCOMPONENTSAPPLICATIONPATH.$com.DIRECTORY_SEPARATOR.'fields'.DIRECTORY_SEPARATOR.$type.'.php';
			if(!file_exists($fn)){
				$fn=BCOMPONENTSFRAMEWORKPATH.$com.DIRECTORY_SEPARATOR.'fields'.DIRECTORY_SEPARATOR.$type.'.php';
				}
			$class='BControllerField_'.$com.'_'.$type;
			}
		if(!file_exists($fn)){
			if(DEBUG_MODE){
				BDebug::error('File "'.$fn.'" does not exist! type='.$type.', com='.$com);
				}
			return NULL;
			}
		require_once($fn);
		$field=new $class;
		$field->controller=$this;
		$field->com=$com;
		return $field;
		}
public function field_get ( $ type , $ com = '' ) { if ( empty ( $ com ) ) { $ fn = BLIBRARIESFRAMEWORKPATH . 'mvc' . DIRECTORY_SEPARATOR . 'field' . DIRECTORY_SEPARATOR . $ type . '.php' ; $ class = 'BControllerField_' . $ type ; } else { $ fn = BCOMPONENTSAPPLICATIONPATH . $ com . DIRECTORY_SEPARATOR . 'fields' . DIRECTORY_SEPARATOR . $ type . '.php' ; if ( ! file_exists ( $ fn ) ) { $ fn = BCOMPONENTSFRAMEWORKPATH . $ com . DIRECTORY_SEPARATOR . 'fields' . DIRECTORY_SEPARATOR . $ type . '.php' ; } $ class = 'BControllerField_' . $ com . '_' . $ type ; } if ( ! file_exists ( $ fn ) ) { if ( DEBUG_MODE ) { BDebug :: error ( 'File "' . $ fn . '" does not exist! type=' . $ type . ', com=' . $ com ) ; } return NULL ; } require_once ( $ fn ) ; $ field = new $ class ; $ field -> controller = $ this ; $ field -> com = $ com ; return $ field ; }
Load fields objects by component & field type
@return null|\BControllerField
Load fields objects by component & field type