public static function get_instance()
 {
     $global = null;
     $globals = EZP_CS_JSON_Entity_Base::get_by_type(self::TYPE);
     if ($globals != null) {
         $global = $globals[0];
     }
     return $global;
 }
Exemplo n.º 2
0
 public static function activate()
 {
     EZP_CS_Utility::debug("activate");
     $installed_ver = get_option(EZP_CS_Constants::PLUGIN_VERSION_OPTION_KEY);
     EZP_CS_JSON_Entity_Base::init_table();
     EZP_Contact_Entity::init_table();
     EZP_Email_Entity::init_table();
     EZP_CS_Subscriber_Entity::init_table();
     EZP_CS_Global_Entity::initialize_plugin_data();
     update_option(EZP_CS_Constants::PLUGIN_VERSION_OPTION_KEY, EZP_CS_Constants::PLUGIN_VERSION);
 }
 /**
  * 
  * @param type $id
  * @return EZP_CS_Display_Entity
  */
 public static function get_by_id($id)
 {
     return EZP_CS_JSON_Entity_Base::get_by_id_and_type($id, self::TYPE);
 }