当前位置: 首页>>代码示例>>PHP>>正文


PHP Contact::get方法代码示例

本文整理汇总了PHP中Contact::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Contact::get方法的具体用法?PHP Contact::get怎么用?PHP Contact::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Contact的用法示例。


在下文中一共展示了Contact::get方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: contact_edit

 public function contact_edit()
 {
     $id = $this->getParam(0, 0);
     $isPost = $this->request->isPost();
     $errors = array();
     $contact = new Contact();
     if (!empty($id)) {
         $contact = Contact::get($id);
         if (empty($contact)) {
             throw new Exception('Undefined contact with id = [' . $id . ']');
         }
     }
     // $id, $name, $action, $method, $class, $errors, $isPost
     $form = $contact->getForm('form-contact-admin', 'form-contact-admin', ROOT_HTTP . 'admin/contact', 'POST', 'form-horizontal', $errors, $isPost);
     $vars['form'] = $form;
     $this->render('admin/contact', $vars);
 }
开发者ID:erichub,项目名称:-Dashboard-Process,代码行数:17,代码来源:AdminController.class.php

示例2: array

 function employee_get()
 {
     $filters = $this->get("filter")["filters"];
     $data["results"] = array();
     $data["count"] = 0;
     $obj = new Contact(null, $this->entity);
     $obj->where("contact_type_id", 3);
     $obj->get();
     foreach ($obj as $value) {
         //Results
         $data["results"][] = array("id" => $value->id, "name" => $value->surname . ' ' . $value->name);
     }
     //Response Data
     $this->response($data, 200);
 }
开发者ID:nicarayz,项目名称:linabiz,代码行数:15,代码来源:contacts.php

示例3: foreach

    </section>
</div>

<div class="colonne demi droite">
    <section class="contenu demi">
        <h4>Électeurs souhaitant donner une procuration</h4>
		
		<ul class="listeContacts">
    	<?php 
if ($data->procurationsNumber()) {
    // On fait la liste des contacts concernés
    $contacts = $data->contactsList(3);
    foreach ($contacts as $contact) {
        // On ouvre la fiche du contact concerné
        $fiche = new Contact(md5($contact[0]));
        if ($fiche->get('sexe') == 'H') {
            $sexe = 'homme';
        } elseif ($fiche->get('sexe') == 'F') {
            $sexe = 'femme';
        } else {
            $sexe = 'isexe';
        }
        if (!empty($fiche->display_name())) {
            $nomAffichage = $fiche->display_name();
        } elseif (!empty($fiche->get('organisme'))) {
            $nomAffichage = $fiche->get('organisme');
        } else {
            $nomAffichage = 'Fiche sans nom';
        }
        ?>
		<a href="<?php 
开发者ID:leqg,项目名称:leqg,代码行数:31,代码来源:mission-retours.tpl.php

示例4: Contact

// On protège la page
User::protection(5);
// On charge le contact
if (isset($_GET['fiche'])) {
    $contact = new Contact(md5($_GET['fiche']));
} else {
    Core::goPage('contacts', true);
}
// On charge le template
Core::loadHeader();
?>
<section id="fiche">
	<header>
    <?php 
if (!empty($contact->get('contact_nom')) || !empty($contact->get('contact_nom_usage')) || !empty($contact->get('contact_prenoms'))) {
    ?>
		<h2><?php 
    echo $contact->get('nom_affichage');
    ?>
</h2>
    <?php 
} elseif (!empty($contact->get('contact_organisme'))) {
    ?>
		<h2><?php 
    echo $contact->get('contact_organisme');
    ?>
    <?php 
} else {
    ?>
		<h2>Fiche sans nom</h2>
开发者ID:leqg,项目名称:leqg,代码行数:30,代码来源:fiche.tpl.php

示例5: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     if ($this->ID) {
         Session::set("FamilyID", $this->ID);
     }
     $nameField = TextField::create('Name', 'Family Name');
     $fields->replaceField('Name', $nameField);
     $houseNoField = TextField::create('HouseNo', 'House No (govt)');
     $fields->replaceField('HouseNo', $houseNoField);
     $parishes = Parish::get()->map('ID', 'NameWithLocation')->toArray();
     $parishField = DropdownField::create('ParishID', 'Parish')->setSource($parishes);
     $parishField->setEmptyString('select...');
     $fields->replaceField('ParishID', $parishField);
     //remove FamilyMembers tab
     $fields->removeByName('FamilyMembers');
     $memberGridFieldConfig = GridFieldConfig_RecordEditor::create();
     $familyMemberList = FamilyMember::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     $familyMemberGridField = new GridField('Members', 'Family members', $familyMemberList, $memberGridFieldConfig);
     $fields->addFieldsToTab('Root.Members', array($familyMemberGridField));
     //house gridfield
     $houseGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $houseList = House::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($houseList->count()) {
         $houseGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $houseGridField = new GridField('House', 'House', $houseList, $houseGridFeildConfig);
     $fields->addFieldsToTab('Root.Housing', array($houseGridField));
     //land gridfield
     $landGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $landList = Land::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($landList->count()) {
         $landGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $landGridField = new GridField('Land', 'Land', $landList, $landGridFeildConfig);
     $fields->addFieldsToTab('Root.Housing', array($landGridField));
     //ShiftedFrom gridfield
     $shiftedFromGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $shiftedFromList = ShiftedFrom::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($shiftedFromList->count()) {
         $shiftedFromGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $shiftedFromGridField = new GridField('Shifted', 'Shifted', $shiftedFromList, $shiftedFromGridFeildConfig);
     $fields->addFieldsToTab('Root.Housing', array($shiftedFromGridField));
     //Agriculture gridfield
     $agricultureGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $agricultureList = Agriculture::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($agricultureList->count()) {
         $agricultureGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $agricultureGridField = new GridField('Agriculture', 'Agriculture', $agricultureList, $agricultureGridFeildConfig);
     $fields->addFieldsToTab('Root.Occupation', array($agricultureGridField));
     //Business gridfield
     $businessGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $businessList = Business::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($businessList->count()) {
         $businessGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $businessGridField = new GridField('Business', 'Business', $businessList, $businessGridFeildConfig);
     $fields->addFieldsToTab('Root.Occupation', array($businessGridField));
     //MonthlyIncome gridfield
     $monthlyIncomeGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $monthlyIncomeList = MonthlyIncome::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($monthlyIncomeList->count()) {
         $monthlyIncomeGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $monthlyIncomeGridField = new GridField('MonthlyIncome', 'MonthlyIncome', $monthlyIncomeList, $monthlyIncomeGridFeildConfig);
     $fields->addFieldsToTab('Root.Monthly', array($monthlyIncomeGridField));
     //MonthlyExpense gridfield
     $monthlyExpenseGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $monthlyExpenseList = MonthlyExpense::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($monthlyExpenseList->count()) {
         $monthlyExpenseGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $monthlyExpenseGridField = new GridField('MonthlyExpense', 'MonthlyExpense', $monthlyExpenseList, $monthlyExpenseGridFeildConfig);
     $fields->addFieldsToTab('Root.Monthly', array($monthlyExpenseGridField));
     //Vehicle gridfield
     $vehicleGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $vehicleList = Vehicle::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($vehicleList->count()) {
         $vehicleGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $vehicleGridField = new GridField('Vehicle', 'Vehicle', $vehicleList, $vehicleGridFeildConfig);
     $fields->addFieldsToTab('Root.OtherDetails', array($vehicleGridField));
     //Appliance gridfield
     $applianceGridFeildConfig = GridFieldConfig_RecordEditor::create();
     $applianceList = Appliance::get()->filter(array('FamilyID' => $this->ID))->sort('ID ASC');
     // remove add button if record already exists
     if ($applianceList->count()) {
         $applianceGridFeildConfig->removeComponentsByType('GridFieldAddNewButton');
     }
     $applianceGridField = new GridField('Appliance', 'Appliance', $applianceList, $applianceGridFeildConfig);
//.........这里部分代码省略.........
开发者ID:thomaspaulson,项目名称:myparish,代码行数:101,代码来源:Family.php

示例6: Contact

?>

<h2>Résultats</h2>

<ul class="listeEncadree">
	
    <?php 
foreach ($contacts as $c) {
    $contact = new Contact(md5($c[0]));
    ?>
	<li class="electeur">
    <?php 
    if (isset($_GET['destination']) && $_GET['destination'] == 'interaction') {
        ?>
		<a href="<?php 
        Core::goPage('interaction', array('action' => 'ajout', 'fiche' => $contact->get('contact_id')));
        ?>
" class="nostyle">
    <?php 
    } else {
        ?>
 
		<a href="<?php 
        Core::goPage('contacts', array('fiche' => $contact->get('contact_id')));
        ?>
" class="nostyle">
    <?php 
    }
    ?>
			<strong><?php 
    echo $contact->get('nom_affichage');
开发者ID:leqg,项目名称:leqg,代码行数:31,代码来源:resultats.tpl.php

示例7: date

require __DIR__ . "/models/Post.php";
require __DIR__ . "/models/Tag.php";
$date = date('Y-m-d');
// Configure Phormium
\Phormium\DB::configure('config.json');
// Create a person and three contacts
Person::fromArray(["id" => 1, "name" => "Ivan"])->save();
Contact::fromArray(["id" => 1, "person_id" => 1, "value" => "foo"])->save();
Contact::fromArray(["id" => 2, "person_id" => 1, "value" => "bar"])->save();
Contact::fromArray(["id" => 3, "person_id" => 1, "value" => "baz"])->save();
// Fetch the person, then get her contacts
$person = Person::get(1);
$contacts = $person->contacts()->fetch();
print_r($contacts);
// Fetch the contact, then get the person it belongs to
$contact = Contact::get(1);
$person = $contact->person()->single();
print_r($person);
// Create a post and three tags
Post::fromArray(["date" => $date, "no" => 1, "title" => "Post #1"])->save();
Tag::fromArray(["id" => 1, "post_date" => $date, "post_no" => 1, "value" => "Tag #1"])->save();
Tag::fromArray(["id" => 2, "post_date" => $date, "post_no" => 1, "value" => "Tag #2"])->save();
Tag::fromArray(["id" => 3, "post_date" => $date, "post_no" => 1, "value" => "Tag #3"])->save();
// Fetch a post, then fetch it's tags
$post = Post::get($date, 1);
$tags = $post->tags()->fetch();
print_r($tags);
// Fetch a tag, then fetch the post it belongs to
$tag = Tag::get(2);
$post = $tag->post()->single();
print_r($post);
开发者ID:Macavity,项目名称:phormium,代码行数:31,代码来源:relations.php

示例8: all

 public function all($parameters = array())
 {
     $response = new Response(Contact::get(self::base_uri(), $parameters));
     self::handle_collection($response);
     return $response;
 }
开发者ID:graphem,项目名称:v1wrappers,代码行数:6,代码来源:vr_api_contact.php

示例9: array

    // On récupère les informations
    $infos = array('titre' => $_GET['titre'], 'message' => $_GET['message']);
    // On va commencer par créer la campagne
    $idCampagne = Campagne::creation('email', $infos);
    // On ouvre ensuite cette campagne
    $campagne = new Campagne(md5($idCampagne));
    // On récupère les données
    $var = $_GET;
    // On retraite les critères complexes
    $var['criteres'] = trim($var['criteres'], ';');
    // On charge les fiches correspondantes
    $contacts = Contact::listing($var, 0, false);
    $listing = array();
    // Pour chaque fiche, on créé un envoi
    foreach ($contacts as $contact) {
        // On ouvre la fiche contact pour récupérer le numéro de téléphone
        $c = new Contact(md5($contact));
        unset($mobile);
        // On démarre l'instance Mail
        $listing[] = array('email' => $c->get('email'), 'name' => $c->get('nom_affichage'), 'type' => 'to');
    }
    // On charge le système de mail
    $mail = Configuration::read('mail');
    // On prépare le message
    $message = array('html' => nl2br($infos['message']), 'subject' => $infos['titre'], 'from_email' => 'noreply@leqg.info', 'from_name' => 'LeQG', 'to' => $listing, 'headers' => array('Reply-To' => 'webmaster@leqg.info'), 'track_opens' => true, 'auto_text' => true);
    // mode asynchrone d'envoi du mail
    $async = true;
    // on lance l'envoi du mail
    $result = $mail->messages->send($message, $async);
    Core::debug($result, false);
}
开发者ID:leqg,项目名称:leqg,代码行数:31,代码来源:email-campagne.ajax.php

示例10: foreach

?>
	
    <?php 
if ($data->newContactsNumber()) {
    ?>
	<section id="procurations" class="contenu demi">
		<h4>Électeurs souhaitant être recontactés</h4>
		
		<ul class="listeContacts">
    <?php 
    // On fait la liste des contacts concernés
    $contacts = $data->contactsList(4);
    foreach ($contacts as $contact) {
        // On ouvre la fiche du contact concerné
        $fiche = new Contact(md5($contact[0]));
        if ($fiche->get('contact_sexe') == 'M') {
            $sexe = 'homme';
        } elseif ($fiche->get('contact_sexe') == 'F') {
            $sexe = 'femme';
        } else {
            $sexe = 'isexe';
        }
        if (!empty($fiche->get('nom_affichage'))) {
            $nomAffichage = $fiche->get('nom_affichage');
        } elseif (!empty($fiche->get('contact_organisme'))) {
            $nomAffichage = $fiche->get('contact_organisme');
        } else {
            $nomAffichage = 'Fiche sans nom';
        }
        ?>
			<a href="<?php 
开发者ID:leqg,项目名称:leqg,代码行数:31,代码来源:porte-mission.tpl.php

示例11: mb_convert_case

if (!isset($_GET['electeur'])) {
    Core::goPage('reporting', array('mission' => $_GET['mission']), true);
}
// typologie
$typologie = $data->get('mission_type') == 'porte' ? 'porte' : 'boite';
// On charge le header
Core::loadHeader();
?>

	<h2>Mission &laquo;&nbsp;<?php 
echo $data->get('mission_nom');
?>
&nbsp;&raquo;</h2>

    <h3 style="margin: 20px;"><?php 
echo mb_convert_case($contact->get('contact_nom'), MB_CASE_UPPER) . ' ' . mb_convert_case($contact->get('contact_nom_usage'), MB_CASE_UPPER) . ' ' . mb_convert_case($contact->get('contact_prenoms'), MB_CASE_TITLE);
?>
</h3>

    <a href="<?php 
Core::goPage('report', array('code' => $_GET['code'], 'rue' => $_GET['rue'], 'immeuble' => $_GET['immeuble'], 'electeur' => $_GET['electeur'], 'statut' => 1));
?>
" class="nostyle bouton">Absent</a>
    <a href="<?php 
Core::goPage('report', array('code' => $_GET['code'], 'rue' => $_GET['rue'], 'immeuble' => $_GET['immeuble'], 'electeur' => $_GET['electeur'], 'statut' => 2));
?>
" class="nostyle bouton">Ouvert</a>
    <a href="<?php 
Core::goPage('report', array('code' => $_GET['code'], 'rue' => $_GET['rue'], 'immeuble' => $_GET['immeuble'], 'electeur' => $_GET['electeur'], 'statut' => 3));
?>
" class="nostyle bouton">Demande procuration</a>
开发者ID:leqg,项目名称:leqg,代码行数:31,代码来源:mission-electeur.tpl.php

示例12: fetchContacts

 /**
  * GET /contacts
  * 自分のコンタクト一覧を取得.
  *
  * 引数:なし
  */
 public function fetchContacts()
 {
     $this->loadModel('Chatwork.Contact');
     $results = Contact::get(array());
     $this->out(print_r($results, true));
 }
开发者ID:sirone,项目名称:chatwork_cakephp,代码行数:12,代码来源:ChatworkShell.php


注:本文中的Contact::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。