當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Organization::get方法代碼示例

本文整理匯總了PHP中Organization::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Organization::get方法的具體用法?PHP Organization::get怎麽用?PHP Organization::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Organization的用法示例。


在下文中一共展示了Organization::get方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testGetMe

 public function testGetMe()
 {
     $at = getenv("BB_ACCESS_TOKEN");
     $o = Organization::get($at);
     $this->assertInstanceOf('\\ClausConrad\\BillysBilling\\Organization', $o, 'Getting own organization returns an Organization instance.');
     $this->assertNotNull($o->id, 'Own organization has an organization ID.');
     $this->assertNotEmpty($o->id, 'Own organization has an organization ID');
 }
開發者ID:cconrad,項目名稱:billysbilling-v2-php-sdk,代碼行數:8,代碼來源:OrganizationTest.php

示例2: PersonalRegisterForm

 public function PersonalRegisterForm()
 {
     $fields = FieldList::create(array(EmailField::create('Email', '電子郵件'), ConfirmedPasswordField::create('Password', '密碼'), TextField::create('FullName', '姓名'), TextField::create('IDCard', '身份證號碼'), TextField::create('Phone', '聯係電話'), DropdownField::create('OrganizationID', '所屬單位名稱', Organization::get()->map('ID', 'company_name'))->setEmptyString('請選擇')));
     $actions = FieldList::create(array(FormAction::create('doRegisterPersonal', '提交')));
     $required = RequiredFields::create(array('Email', 'Password', 'FullName', 'IDCard', 'Phone', 'OrganizationID'));
     $form = new Form($this, __FUNCTION__, $fields, $actions, $required);
     return $form;
 }
開發者ID:jallen0927,項目名稱:lytech,代碼行數:8,代碼來源:RegisterPage_Controller.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $rsvps = Rsvp::where('user_id', '=', Auth::user()->id)->get();
     $organizations = Organization::get();
     $user = Auth::user();
     if (empty($user->first_name) || empty($user->last_name) || empty($user->zip)) {
         return Redirect::action('UsersController@edit', [$user->id]);
     }
     return View::make('users.index')->with('rsvps', $rsvps);
 }
開發者ID:thehelpster,項目名稱:helpster,代碼行數:15,代碼來源:UsersController.php

示例4: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $organizations = Organization::get();
     return View::make('admin')->with('organizations', $organizations);
 }
開發者ID:alexsynarchin,項目名稱:Itnk,代碼行數:10,代碼來源:AdminController.php

示例5: load_organizations

 public function load_organizations()
 {
     $country_id = $_POST['country_id'];
     $data = new Organization();
     if ($country_id > 0) {
         $data->where('country_id', $country_id);
     }
     $data->get();
     echo '<select name="org_id" class="form-control">';
     echo '<option value="">-- select organization --</option>';
     foreach ($data as $key => $data_item) {
         echo '<option value="' . $data_item->id . '">' . $data_item->org_name . '</option>';
     }
     echo '</select>';
 }
開發者ID:ultraauchz,項目名稱:asean_cultural_mapping,代碼行數:15,代碼來源:organizations.php

示例6: Organization

 // Record Organization and create similar
 // Insert new organization...:
 $edited_Organization = new Organization();
 // Check that this action request is not a CSRF hacked request:
 $Session->assert_received_crumb('organization');
 // Check permission:
 $current_User->check_perm('users', 'edit', true);
 // load data from request
 if ($edited_Organization->load_from_Request()) {
     // We could load data from form without errors:
     // While inserting into DB, ID property of Organization object will be set to autogenerated ID
     // So far as we set ID manualy, we need to preserve this value
     // When assignment of wrong value will be fixed, we can skip this
     $entered_organization_id = $edited_Organization->ID;
     $DB->begin();
     $duplicated_organization_ID = $edited_Organization->dbexists('org_name', $edited_Organization->get('name'));
     if ($duplicated_organization_ID) {
         // We have a duplicate entry:
         param_error('org_name', sprintf(T_('This organization name already exists. Do you want to <a %s>edit the existing organization</a>?'), 'href="?ctrl=organizations&amp;action=edit&amp;org_ID=' . $duplicated_organization_ID . '"'));
     } else {
         // Insert in DB:
         $edited_Organization->dbinsert();
         $Messages->add(T_('New organization created.'), 'success');
     }
     $DB->commit();
     if (!param_errors_detected()) {
         // No errors
         switch ($action) {
             // What next?
             case 'create_copy':
                 // Redirect so that a reload doesn't write to the DB twice:
開發者ID:Ariflaw,項目名稱:b2evolution,代碼行數:31,代碼來源:organizations.ctrl.php

示例7: all

 public function all()
 {
     $organizations = Organization::get();
     return View::make('organization.organizations')->with('organizations', $organizations);
 }
開發者ID:alexsynarchin,項目名稱:Itnk,代碼行數:5,代碼來源:OrganizationsController.php


注:本文中的Organization::get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。