예제 #1
0
파일: User.php 프로젝트: noikiy/inovi
<?php

namespace Thin;

use CrudBundle\Crud as c;
return array('singular' => 'Utilisateur', 'plural' => 'Utilisateurs', 'default_order' => 'name', 'default_order_direction' => 'ASC', 'items_by_page' => 25, 'display' => 'firstname,name', 'many' => array(), 'before_create' => function () {
    $_POST['password'] = sha1($_POST['password']);
}, 'after_create' => null, 'before_read' => null, 'after_read' => null, 'before_update' => function () {
    $_POST['password'] = !Inflector::isSha1($_POST['password']) ? sha1($_POST['password']) : $_POST['password'];
}, 'after_update' => null, 'before_delete' => null, 'after_delete' => null, 'fields' => array('username' => array('label' => 'Identifiant'), 'name' => array('label' => 'Nom'), 'firstname' => array('label' => 'Prénom'), 'password' => array('label' => 'Mot de passe', 'is_listable' => false, 'is_exportable' => false, 'is_searchable' => false, 'is_sortable' => false, 'form_type' => 'password'), 'skype' => array('is_listable' => false, 'required' => false), 'partner_id' => array('label' => 'Partenaire', 'content_view' => function ($row) {
    return c::row($row, 'partner', 'name');
}, 'content_list' => function ($row) {
    return c::row($row, 'partner', 'name', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'partner', 'name', 'name');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('partner_id', 'partner', 'name', 'name', $row->partner_id, $required);
}), 'gender' => array('is_listable' => false, 'label' => 'Civilité', 'content_view' => function ($row) {
    return c::vocabulary($row['gender'], 'Monsieur, Madame, Mademoiselle');
}, 'content_list' => function ($row) {
    return c::vocabulary($row['gender'], 'Monsieur, Madame, Mademoiselle');
}, 'content_search' => function ($idField) {
    return c::vocabularies($idField, 'Monsieur, Madame, Mademoiselle');
}, 'content_create' => function ($row, $required) {
    return c::vocabulariesForm('gender', 'Monsieur, Madame, Mademoiselle', $row->gender, $required);
}), 'tel_work' => array('label' => 'Tel'), 'tel_home' => array('label' => 'Tel Dom.', 'is_listable' => false), 'tel_cellular' => array('label' => 'Tel Mob.', 'is_listable' => false), 'twitter' => array('is_listable' => false), 'linkedin' => array('is_listable' => false)));
예제 #2
0
}, 'content_list' => function ($row) {
    return c::row($row, 'appointmentlocation', 'value', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'appointmentlocation', 'value', 'value');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('appointmentlocation_id', 'appointmentlocation', 'value', 'value', $row->appointmentlocation_id, $required);
}), 'contact_id' => array('label' => 'Contact', 'form_type' => 'text', 'required' => true, 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => function ($row) {
    return c::row($row, 'contact', 'firstname,name');
}, 'content_list' => function ($row) {
    return c::row($row, 'contact', 'firstname,name', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'contact', 'firstname,name', 'name');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('contact_id', 'contact', 'firstname,name', 'name', $row->contact_id, $required);
}), 'owner_id' => array('label' => 'Propriétaire', 'form_type' => 'text', 'required' => true, 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => function ($row) {
    return c::row($row, 'owner', 'firstname,name');
}, 'content_list' => function ($row) {
    return c::row($row, 'owner', 'firstname,name', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'owner', 'firstname,name', 'name');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('owner_id', 'owner', 'firstname,name', 'name', $row->owner_id, $required);
}), 'date_add' => array('label' => 'DateAdd', 'form_type' => 'text', 'required' => true, 'is_listable' => false, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'date_start' => array('label' => 'Date du RDV', 'form_type' => 'text', 'required' => true, 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'hour_start' => array('label' => 'HourStart', 'form_type' => 'text', 'required' => true, 'is_listable' => false, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'duration' => array('label' => 'Duration', 'form_type' => 'text', 'required' => true, 'is_listable' => false, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'address' => array('label' => 'Address', 'form_type' => 'text', 'required' => true, 'is_listable' => false, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'zipcode' => array('label' => 'Zipcode', 'form_type' => 'text', 'required' => true, 'is_listable' => false, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'city' => array('label' => 'Ville', 'form_type' => 'text', 'required' => true, 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'user_id' => array('label' => 'Utilisateur', 'form_type' => 'text', 'required' => true, 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => function ($row) {
    return c::row($row, 'user', 'firstname,name');
}, 'content_list' => function ($row) {
    return c::row($row, 'user', 'firstname,name', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'user', 'firstname,name', 'name');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('user_id', 'user', 'firstname,name', 'name', $row->user_id, $required);
}), 'contactdata' => array('label' => 'Contactdata', 'form_type' => 'text', 'required' => true, 'is_listable' => false, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'appointmentdata' => array('label' => 'Appointmentdata', 'form_type' => 'text', 'required' => true, 'is_listable' => false, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null)));
예제 #3
0
파일: Partner.php 프로젝트: noikiy/inovi
<?php

namespace Thin;

use CrudBundle\Crud as c;
return array('singular' => 'Parteneraire', 'plural' => 'Parteneraires', 'default_order' => 'name', 'default_order_direction' => 'ASC', 'items_by_page' => 25, 'display' => 'name', 'many' => array('user'), 'before_create' => null, 'after_create' => null, 'before_read' => null, 'after_read' => null, 'before_update' => null, 'after_update' => null, 'before_delete' => null, 'after_delete' => null, 'before_list' => null, 'after_list' => null, 'fields' => array('partnerfather_id' => array('label' => 'Parent', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => function ($row) {
    return c::row($row, 'partnerfather', 'name');
}, 'content_list' => function ($row) {
    return c::row($row, 'partnerfather', 'name', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'partnerfather', 'name', 'name');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('partnerfather_id', 'partnerfather', 'name', 'name', $row->partnerfather_id, $required);
}), 'name' => array('label' => 'Nom', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'owner_id' => array('label' => 'Propriétaire', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => function ($row) {
    return c::row($row, 'owner', 'firstname,name');
}, 'content_list' => function ($row) {
    return c::row($row, 'owner', 'firstname,name', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'owner', 'firstname,name', 'name');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('owner_id', 'owner', 'firstname,name', 'name', $row->owner_id, $required);
}), 'tel' => array('label' => 'Tel', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'fax' => array('label' => 'Fax', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'email' => array('label' => 'Email', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'address' => array('label' => 'Adresse', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'zipcode' => array('label' => 'CP', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'city' => array('label' => 'Ville', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => null, 'content_list' => null, 'content_search' => null, 'content_create' => null), 'country_id' => array('label' => 'Pays', 'form_type' => 'text', 'is_listable' => true, 'is_exportable' => true, 'is_searchable' => true, 'is_sortable' => true, 'is_readable' => true, 'is_creatable' => true, 'is_updatable' => true, 'content_view' => function ($row) {
    return c::row($row, 'country', 'fr');
}, 'content_list' => function ($row) {
    return c::row($row, 'country', 'fr', false);
}, 'content_search' => function ($idField) {
    return c::rows($idField, 'country', 'fr', 'fr');
}, 'content_create' => function ($row, $required) {
    return c::rowsForm('country_id', 'country', 'fr', 'fr', $row->country_id, $required);
})));