本文整理汇总了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);
}