/** * Class constructor. * * @since 1.0 * @access public */ public function __construct($params = array()) { // Helper json library. $this->json = FD::json(); // Field library $this->lib = FD::fields(); // Field handlers $this->handler = $this->lib->getHandler(); // Init params $this->init($params); }
private function loadAppData($appId) { if (count(self::$_apps) == 0) { // lets load all apps. // $model = FD::model( 'Apps' ); // $options = array( 'type' => SOCIAL_APPS_TYPE_FIELDS ); // $apps = $model->setLimit(0)->getApps( $options ); // if( $apps ) // { // foreach( $apps as $app ) // { // self::$_apps[ $app->id ] = $app; // } // } $dbcache = FD::dbcache('app'); // TODO: Change this to where case. $result = $dbcache->loadObjectList(array('type' => SOCIAL_APPS_TYPE_FIELDS)); self::$_apps = $dbcache->bindTable($result); } return self::$_apps[$appId]; }
/** * An alias to FD::getInstance( 'Config' , 'joomla' ) * * Example: * <code> * <?php * $config = FD::jconfig(); * echo $config->getValue( 'some.value' ); * ?> * </code> * * @since 1.0 * @access public * @param null * @return SocialTableConfig Configuration object. * * @author Mark Lee <*****@*****.**> */ public static function fields($params = array()) { FD::load('Fields'); $fields = SocialFields::getInstance($params); return $fields; }