本文整理匯總了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');
}
示例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;
}
示例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);
}
示例4: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$organizations = Organization::get();
return View::make('admin')->with('organizations', $organizations);
}
示例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>';
}
示例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&action=edit&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:
示例7: all
public function all()
{
$organizations = Organization::get();
return View::make('organization.organizations')->with('organizations', $organizations);
}