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


PHP Company::getId方法代码示例

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


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

示例1: buildForm

 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  *
  * @return null
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $this->company = $options['company'];
     if (null == $this->company) {
         $builder->add('company', EntityType::class, array('label' => 'Docgroupcomptable.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) {
             return $br->createQueryBuilder('c')->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'corporateName', 'multiple' => false, 'by_reference' => true, 'required' => true));
         $builder->add('parent', EntityType::class, array('label' => 'Docgroupcomptable.parent.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) {
             return $dgr->createQueryBuilder('d')->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'empty_data' => null));
         $builder->add('clone', EntityType::class, array('label' => 'Docgroup.clone.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) {
             return $dgr->createQueryBuilder('d')->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'mapped' => false));
     } else {
         $companyId = $this->company->getId();
         $builder->add('company', EntityidType::class, array('label' => 'Docgroupcomptable.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) use($companyId) {
             return $br->createQueryBuilder('c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'id', 'multiple' => false, 'by_reference' => true, 'required' => true));
         $builder->add('parent', EntityType::class, array('label' => 'Docgroupcomptable.parent.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) use($companyId) {
             return $dgr->createQueryBuilder('d')->join('d.company', 'c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'empty_data' => null));
         $builder->add('clone', EntityType::class, array('label' => 'Docgroup.clone.label', 'class' => 'AcfDataBundle:Docgroupcomptable', 'query_builder' => function (DocgroupcomptableRepository $dgr) use($companyId) {
             return $dgr->createQueryBuilder('d')->join('d.company', 'c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('d.pageUrlFull', 'ASC');
         }, 'choice_label' => 'pageUrlFull', 'multiple' => false, 'by_reference' => true, 'required' => false, 'placeholder' => 'Options.choose', 'mapped' => false));
     }
     $builder->add('label', TextType::class, array('label' => 'Docgroupcomptable.label.label'));
     $builder->add('otherInfos', TextareaType::class, array('label' => 'Docgroupcomptable.otherInfos.label', 'required' => false));
 }
开发者ID:sasedev,项目名称:acf-expert,代码行数:36,代码来源:NewTForm.php

示例2: buildForm

 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  *
  * @return null
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $this->company = $options['company'];
     if (null == $this->company) {
         $builder->add('company', EntityType::class, array('label' => 'Address.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) {
             return $br->createQueryBuilder('c')->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'corporateName', 'multiple' => false, 'by_reference' => true, 'required' => true));
     } else {
         $companyId = $this->company->getId();
         $builder->add('company', EntityidType::class, array('label' => 'Address.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) use($companyId) {
             return $br->createQueryBuilder('c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'id', 'multiple' => false, 'by_reference' => true, 'required' => true));
     }
     $builder->add('label', TextType::class, array('label' => 'Address.label.label'));
     $builder->add('streetNum', IntegerType::class, array('label' => 'Address.streetNum.label', 'scale' => 0, 'required' => false));
     $builder->add('address', TextareaType::class, array('label' => 'Address.address.label', 'required' => false));
     $builder->add('address2', TextareaType::class, array('label' => 'Address.address2.label', 'required' => false));
     $builder->add('town', TextType::class, array('label' => 'Address.town.label', 'required' => false));
     $builder->add('zipCode', TextType::class, array('label' => 'Address.zipCode.label', 'required' => false));
     $builder->add('country', CountryType::class, array('label' => 'Address.country.label', 'required' => false, 'placeholder' => 'Options.choose', 'empty_data' => null));
     $builder->add('email', EmailType::class, array('label' => 'Address.email.label', 'required' => false));
     $builder->add('phone', TextType::class, array('label' => 'Address.phone.label', 'required' => false));
     $builder->add('mobile', TextType::class, array('label' => 'Address.mobile.label', 'required' => false));
     $builder->add('fax', TextType::class, array('label' => 'Address.fax.label', 'required' => false));
     $builder->add('otherInfos', TextareaType::class, array('label' => 'Address.otherInfos.label', 'required' => false));
 }
开发者ID:sasedev,项目名称:acf-expert,代码行数:34,代码来源:NewTForm.php

示例3: buildForm

 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  *
  * @return null
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $this->company = $options['company'];
     if (null == $this->company) {
         $builder->add('company', EntityType::class, array('label' => 'CompanyFrame.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) {
             return $br->createQueryBuilder('c')->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'corporateName', 'multiple' => false, 'by_reference' => true, 'required' => true));
     } else {
         $companyId = $this->company->getId();
         $builder->add('company', EntityidType::class, array('label' => 'CompanyFrame.company.label', 'class' => 'AcfDataBundle:Company', 'query_builder' => function (CompanyRepository $br) use($companyId) {
             return $br->createQueryBuilder('c')->where('c.id = :id')->setParameter('id', $companyId)->orderBy('c.corporateName', 'ASC');
         }, 'choice_label' => 'id', 'multiple' => false, 'by_reference' => true, 'required' => true));
     }
     $builder->add('year', IntegerType::class, array('label' => 'MBSale.year.label'));
 }
开发者ID:sasedev,项目名称:acf-expert,代码行数:23,代码来源:NewYearTForm.php

示例4: updateCompany

 public function updateCompany(Company $company)
 {
     $result = $this->companyDao->get($company->getId());
     ResultHelper::whenEmpty($result, AppLabelUtil::$ERROR_COMPANY_NOT_FOUND, HttpStatusCode::badRequest());
     $company->setStatus($this->validateStatus($company->getStatus()));
     $this->companyDao->update($company);
 }
开发者ID:euBatham,项目名称:javacature,代码行数:7,代码来源:CompanyService.class.php

示例5: getTableName

 protected function getTableName()
 {
     return Company::getId() . '_ProjectMessages';
     /*$campaign = Company::search_by_domain($_SERVER['SERVER_NAME']);
     		if ($campaign->id) {
     			return '`'.$campaign->id.'_ProjectMessages`';
     		} else {
     			return "`ProjectMessages`";
     		}*/
 }
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:10,代码来源:YiiChatDbHandlerBase.php

示例6: filterLogin

 public function filterLogin($filterChain)
 {
     $id = Company::getId();
     if (empty($id)) {
         throw new RuntimeException('非法访问');
     }
     $this->comId = $id;
     $this->comName = Company::getName();
     return $filterChain->run();
 }
开发者ID:WalkerDi,项目名称:mama,代码行数:10,代码来源:BaseNurserController.php

示例7: mapCompanyToDto

 public function mapCompanyToDto(Company $company)
 {
     $companyDto = new CompanyDto();
     $companyDto->setId($company->getId());
     $companyDto->setName($company->getName());
     $companyDto->setContactName($company->getContactName());
     $companyDto->setEmail($company->getEmail());
     $companyDto->setPhoneNumber($company->getPhoneNumber());
     $companyDto->setRegion($company->getRegion());
     $companyDto->setWebsite($company->getWebsite());
     $companyDto->setStatus($company->getStatus());
     return $companyDto;
 }
开发者ID:euBatham,项目名称:javacature,代码行数:13,代码来源:CompanyMapper.class.php

示例8: actionUpload

 public function actionUpload()
 {
     if ($_GET['id']) {
         $id = intval($_GET['id']);
     }
     if ($_GET['unixtime']) {
         $unixtime = intval($_GET['unixtime']);
     }
     $folder = Yii::getPathOfAlias('webroot') . '/uploads/c' . Company::getId();
     if ($id) {
         $folder .= '/' . $id . '/';
     } else {
         $folder .= '/temp/' . $unixtime . '/';
     }
     $result = Tools::uploadMaterials($folder);
     echo htmlspecialchars(json_encode($result), ENT_NOQUOTES);
     if ($id && $result['success'] && User::model()->isCustomer()) {
         EventHelper::materialsAdded($id);
     }
 }
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:20,代码来源:ZakazController.php

示例9: setCompany

 /**
  * Declares an association between this object and a Company object.
  *
  * @param      Company $v
  * @return     Element The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setCompany(Company $v = null)
 {
     if ($v === null) {
         $this->setCompanyId(NULL);
     } else {
         $this->setCompanyId($v->getId());
     }
     $this->aCompany = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Company object, it will not be re-added.
     if ($v !== null) {
         $v->addElement($this);
     }
     return $this;
 }
开发者ID:Chipusy,项目名称:lkbroker,代码行数:22,代码来源:BaseElement.php

示例10: tableName

 public function tableName()
 {
     return Company::getId() . '_' . 'Profiles';
     //Yii::app()->getModule('user')->tableProfiles;
 }
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:5,代码来源:Profile.php

示例11: isCompanyManager

 /**
  * Check if this user is manager of a given company
  *
  * If $company is missing user will be checked agains his own company
  *
  * @param Company $company
  * @return boolean
  */
 function isCompanyManager($company)
 {
     if ($this->isAdministrator() || $this->isPeopleManager()) {
         return true;
     }
     // if
     return $this->getCompanyId() == $company->getId() && $this->getSystemPermission('manage_company_details');
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:16,代码来源:User.class.php

示例12: array

<?php 
/* @var $this ZakazController */
/* @var $model Zakaz */
$this->breadcrumbs = array(ProjectModule::t('Zakazs') => array('index'), ProjectModule::t('List'));
?>
<h1><?php 
echo ProjectModule::t('Zakazs');
?>
</h1>
<h1 class='projects-title'><?php 
echo ProjectModule::t('SelectProject');
?>
</h1>
<?php 
if (Company::getId()) {
    $columns = array('id', 'title');
    if (ProjectField::model()->inTableByVarname('specials')) {
        $columns[] = array('name' => 'specials', 'filter' => Catalog::getAll('specials'), 'value' => '$data->catalog_specials->cat_name');
    }
    if (ProjectField::model()->inTableByVarname('specials2')) {
        $columns[] = array('name' => 'specials2', 'filter' => Catalog::getAll('specials2'), 'value' => '$data->catalog_specials2->cat_name');
    }
    $columns[] = 'closestDate';
    if (!isset($only_new)) {
        $columns[] = ['name' => 'executor_event', 'value' => '$data->getExecutorEvents()', 'type' => 'raw'];
    }
}
if (User::model()->isCorrector() && $tech) {
    $url = Yii::app()->createUrl('/project/chat', array('role' => 'Corrector', 'orderId' => ''));
} elseif (isset($only_new)) {
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:30,代码来源:list.php

示例13: isCompanyAdmin

 /**
 * Check if this user is company administration (used to check many other permissions). User must
 * be part of the company and have is_admin stamp set to true
 *
 * @access public
 * @param Company $company
 * @return boolean
 */
 function isCompanyAdmin(Company $company) {
   return ($this->getCompanyId() == $company->getId()) && $this->getIsAdmin();
 } // isCompanyAdmin
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:11,代码来源:User.class.php

示例14: tableName

 /**
  * @return string the associated database table name
  */
 public function tableName()
 {
     return Company::getId() . '_AuthAssignment';
     //return 'AuthAssignment';
 }
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:8,代码来源:AuthAssignment.php

示例15: foreach

    $payFieldsUser = $data->profileUser;
    foreach ($payFields as $field) {
        $fields[] = $field->varname;
        $final[$field->varname] = $field->title;
    }
    $fields = implode($fields, ',');
    $userPayFields = Profile::model()->find(array('select' => $fields, 'condition' => 'user_id = :user', 'params' => array(':user' => $data->profileUser->id)));
    $fields = array();
    if (!empty($userPayFields)) {
        foreach ($userPayFields as $key => $field) {
            if ($field != null) {
                $fields[$key] = $final[$key];
            }
        }
    }
    $model = Company::model()->findByPk(Company::getId());
    if ($model !== null && $model->PaymentCash == '1') {
        $fields['cash'] = 'Наличные';
    }
    return CHtml::dropDownList('paymentType_' . $data->id, $data->details_type, $fields, array('empty' => '', 'disabled' => in_array($data->approve, array(Payment::APPROVED, Payment::REJECTED)) ? true : false, 'ajax' => array('url' => PaymentController::createUrl('getPayNumber'), 'data' => array('payType' => 'js:this.value', 'user' => $data->profileUser->id), 'success' => 'function(html) {
									if (html != "") $("#payDetailNumber_' . $data->id . '").val(html);
									else $("#payDetailNumber_' . $data->id . '").val("");
								}')));
}), array('name' => 'details_number', 'type' => 'raw', 'value' => function ($data) {
    return CHtml::textField("payDetailNumber_{$data->id}", $data->details_number, array('disabled' => in_array($data->approve, array(Payment::APPROVED, Payment::REJECTED)) ? true : false));
}), array('name' => 'approve', 'type' => 'raw', 'value' => function ($data) {
    return approve_buttons($data);
}, 'filter' => array('0' => Yii::t('site', 'New'), '1' => Yii::t('site', 'Confirmed'), '2' => Yii::t('site', 'Rejected'))), array('header' => 'Отменить платеж', 'class' => 'CButtonColumn', 'template' => '{cancel}', 'buttons' => array('cancel' => array('label' => Yii::t('site', 'Cancel'), 'options' => array("class" => "btn btn-primary btn-xs cancel_payment"), 'visible' => 'in_array($data->approve, array(' . Payment::APPROVED . ', ' . Payment::REJECTED . '))', 'click' => 'function(){cancelPayment($(this).attr("href"));return false;}', 'url' => '$data->id'))))));
?>
	Количество: <b><?php 
echo $data['out']['count'];
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:31,代码来源:admin.php


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