set_from_array($array); } if (is_object($array)) { $this->set_from_array((array)$array); } if (empty($this->id)) { $this->id = 'id'.ADFO_fn::get_uniqid(); } } } /** * sempre per dbp-form descrive i dati dei gruppi delle tabelle */ class DbpDs_table_param extends ADFO_data_structures { /** @var string $allow_create SHOW|HIDE Mostra se è possibile non creare il record di una singola tabella */ public $allow_create = "HIDE"; /** @var string $show_title SHOW|HIDE */ public $show_title = "SHOW"; /** @var string $frame_style white|green|yellow|blue|red|purple|brown */ public $frame_style = "WHITE"; /** @var string $title */ public $title = ""; /** @var string $description */ public $description = ""; /** @var string $module_type EDIT (creo la form con i campi modificabili) VIEW (mostro i dati) */ public $module_type = "EDIT"; /** @var string $table_compiled */ public $table_compiled = ""; /** @var string $table_status */ public $table_status = ""; /** @var string $pri_name */ public $pri_name = ""; /** @var string $pri_orgname */ public $pri_orgname = ""; /** @var string $pri_value */ public $pri_value = ""; /** @var string $count_form_block */ public $count_form_block = ""; /** @var string $orgtable */ public $orgtable = ""; /** @var string $table */ public $table = ""; /** @var string $precompiled_primary_id */ public $precompiled_primary_id; /** @var numeric $order */ public $order; /** @var string $table_options Aggiunge altre informazioni alla tabella. * L'ho creato per i metadati. I parametri sono ['type'=>'METADATA','field_key'=>'meta_key', 'value_key'=>'ts_name','field_conn_id'=>'post_id', 'value_key'=>'[%wp_posts.ID]'] */ public $table_options; /** * Setta un frame_style casuale * * @return void */ public function set_rand_frame_style() { $colors = array('WHITE','GREEN','YELLOW','BLUE','RED','PURPLE','BROWN'); $this->frame_style = $colors[rand(0,count($colors)-1)]; } }