public function up() { $migration = new OWMigrationContentClass(); $migration->startMigrationOn('agenda_folder'); $migration->createIfNotExists(); $migration->contentobject_name = '<short_name|name>'; $migration->is_container = TRUE; $migration->name = array('eng-GB' => 'Agendas folder', 'fre-FR' => 'Dossier des agendas', 'always-available' => 'eng-GB'); $migration->addAttribute('name', array('is_required' => TRUE, 'name' => array('eng-GB' => 'Name', 'fre-FR' => 'Nom', 'always-available' => 'eng-GB'))); $migration->addAttribute('short_name', array('name' => array('eng-GB' => 'Short name', 'fre-FR' => 'Nom court', 'always-available' => 'eng-GB'), 'max_length' => 100)); $migration->addToContentClassGroup('Agenda'); $migration->end(); }
public function up() { $migration = new OWMigrationContentClass(); $migration->startMigrationOn('service_folder'); $migration->createIfNotExists(); $migration->contentobject_name = '<title>'; $migration->description = 'Dossier qui regroupe une liste de services'; $migration->is_container = TRUE; $migration->name = 'Dossier de service'; $migration->addAttribute('title', array('description' => 'Nom du dossier qui contient la liste de service', 'is_required' => TRUE, 'name' => 'Titre')); $migration->addToContentClassGroup('Service'); $migration->end(); }
public function up() { $migration = new OWMigrationContentClass(); $migration->startMigrationOn('agenda_schedule'); $migration->createIfNotExists(); $migration->contentobject_name = '<date_start> - <date_end>'; $migration->always_available = TRUE; $migration->name = array('eng-GB' => 'Event schedule', 'fre-FR' => 'Programmation d\'événement', 'always-available' => 'eng-GB'); $migration->addAttribute('date_start', array('data_type_string' => 'ezdate', 'is_required' => TRUE, 'can_translate' => FALSE, 'name' => array('eng-GB' => 'Start date', 'fre-FR' => 'Date de début', 'always-available' => 'eng-GB'))); $migration->addAttribute('date_end', array('data_type_string' => 'ezdate', 'can_translate' => FALSE, 'name' => array('eng-GB' => 'End date', 'fre-FR' => 'Date de fin', 'always-available' => 'eng-GB'))); $migration->addAttribute('hour_start', array('data_type_string' => 'eztime', 'is_required' => TRUE, 'can_translate' => FALSE, 'is_searchable' => FALSE, 'name' => array('eng-GB' => 'Start hour', 'fre-FR' => 'Horaire de début', 'always-available' => 'eng-GB'))); $migration->addAttribute('hour_end', array('data_type_string' => 'eztime', 'is_required' => TRUE, 'can_translate' => FALSE, 'is_searchable' => FALSE, 'name' => array('eng-GB' => 'End hour', 'fre-FR' => 'Horaire de fin', 'always-available' => 'eng-GB'))); $migration->addAttribute('duration', array('data_type_string' => 'eztime', 'is_searchable' => FALSE, 'can_translate' => FALSE, 'name' => array('eng-GB' => 'Duration', 'fre-FR' => 'Durée', 'always-available' => 'eng-GB'))); $migration->addToContentClassGroup('Agenda'); $migration->end(); }
public function up() { $migration = new OWMigrationContentClass(); $migration->startMigrationOn('agenda_event'); $migration->createIfNotExists(); $migration->contentobject_name = '<short_name|name>'; $migration->is_container = TRUE; $migration->name = array('eng-GB' => 'Event', 'fre-FR' => 'Événement', 'always-available' => 'eng-GB'); $migration->addAttribute('name', array('is_required' => TRUE, 'name' => array('eng-GB' => 'Name', 'fre-FR' => 'Nom', 'always-available' => 'eng-GB'))); $migration->addAttribute('short_name', array('name' => array('eng-GB' => 'Short name', 'fre-FR' => 'Nom court', 'always-available' => 'eng-GB'), 'max_length' => 100)); $migration->addAttribute('subtitle', array('name' => array('eng-GB' => 'Subtitle', 'fre-FR' => 'Sous-titre', 'always-available' => 'eng-GB'))); $migration->addAttribute('image', array('data_type_string' => 'ezobjectrelation', 'name' => array('eng-GB' => 'Image', 'fre-FR' => 'Visuel', 'always-available' => 'eng-GB'), 'selection_method' => 'Browse', 'default_selection_node' => 'media', 'fuzzy_match' => FALSE)); $migration->addAttribute('description', array('data_type_string' => 'ezxmltext', 'is_required' => TRUE, 'name' => array('eng-GB' => 'Description', 'fre-FR' => 'Description', 'always-available' => 'eng-GB'))); $migration->addAttribute('publish_start', array('data_type_string' => 'ezdatetime', 'is_required' => TRUE, 'can_translate' => FALSE, 'name' => array('eng-GB' => 'Publish date', 'fre-FR' => 'Date de publication', 'always-available' => 'eng-GB'), 'set_with_current_date' => TRUE)); $migration->addAttribute('publish_end', array('data_type_string' => 'ezdatetime', 'can_translate' => FALSE, 'name' => array('eng-GB' => 'Unpublish date', 'fre-FR' => 'Date de dépublication', 'always-available' => 'eng-GB'))); $migration->addToContentClassGroup('Agenda'); $migration->end(); }
public function up() { $migration = new OWMigrationContentClass(); $migration->startMigrationOn('service_link'); $migration->createIfNotExists(); $migration->contentobject_name = '<title>'; $migration->description = 'Descriptif du service'; $migration->name = 'Service'; $migration->addAttribute('title', array('is_required' => TRUE, 'name' => 'Titre')); $migration->addAttribute('short_title', array('name' => 'Titre court')); $migration->addAttribute('code', array('description' => 'Le code ne doit comporter ni espace, ni caracères spéciaux. Uniquement lettres minuscules et chiffres.', 'is_required' => TRUE, 'name' => 'Code service')); $migration->addAttribute('presentation', array('data_type_string' => 'eztext', 'name' => 'Présentation du service')); $migration->addAttribute('logo', array('data_type_string' => 'ezobjectrelation', 'description' => 'Image qui représente le service', 'is_required' => TRUE, 'name' => 'Logo', 'selection_method' => 'Browse', 'fuzzy_match' => FALSE)); $migration->addAttribute('url', array('data_type_string' => 'ezurl', 'description' => 'EXemple : http://www.mon-service.com', 'is_required' => TRUE, 'is_searchable' => FALSE, 'name' => 'Url du service')); $migration->addAttribute('category', array('data_type_string' => 'ezselection', 'name' => 'Catégorie de service', 'data_int1' => 1, 'data_text5' => '<?xml version="1.0" encoding="utf-8"?> <ezselection><options><option id="0" name="Catégorie 1"/><option id="1" name="Catégorie 2"/><option id="2" name="Catégorie 3"/><option id="3" name="Catégorie 4"/><option id="4" name="Catégorie 5"/><option id="5" name="Catégorie 6"/></options></ezselection> ')); $migration->addToContentClassGroup('Service'); $migration->end(); }