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


PHP Section::getId方法代码示例

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


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

示例1: remove

 public static function remove($name)
 {
     $sectionManager = new Section();
     $sectionManager->load(array('label' => $name));
     $rightManager = new Right();
     $rightManager->delete(array('section' => $sectionManager->getId()));
     $sectionManager->delete(array('id' => $sectionManager->getId()));
 }
开发者ID:kofeve,项目名称:yana-server,代码行数:8,代码来源:Section.class.php

示例2: removeSection

 public function removeSection(Section $section)
 {
     $count = count($this->sections);
     $id = $section->getId();
     for ($i = 0; $i < $count; $i++) {
         if ($this->sections[$i]->getId() === $id) {
             array_splice($this->sections, $i, 1);
             $i--;
             $count--;
         }
     }
     return $this;
 }
开发者ID:jatolmed,项目名称:links,代码行数:13,代码来源:Section.php

示例3: update

 public function update(Section $section)
 {
     $this->updateObject('Section', 's_id', $section->getId(), ['u_id' => $section->getUserId(), 's_supe' => $section->getParentId(), 's_name' => $section->getName()]);
 }
开发者ID:harraps,项目名称:miniForum,代码行数:4,代码来源:SectionManager.php

示例4: KodiCmd

<?php

require_once 'KodiCmd.class.php';
$table = new KodiCmd();
$table->create();
$s1 = new Section();
$s1->setLabel('kodi');
$s1->save();
$r1 = new Right();
$r1->setSection($s1->getId());
$r1->setRead('1');
$r1->setDelete('1');
$r1->setCreate('1');
$r1->setUpdate('1');
$r1->setRank('1');
$r1->save();
$conf = new Configuration();
$conf->put('plugin_kodiCmd_api_url_kodi', 'http://192.168.1.107:85/jsonrpc');
$conf->put('plugin_kodiCmd_api_timeout_kodi', 5);
$conf->put('plugin_kodiCmd_api_recognition_status', '');
$ro = new Room();
$ro->setName('KODI');
$ro->setDescription('De la bonne zic, un bon p\'tit film....');
$ro->save();
$roomManager = new Room();
$rooms = $roomManager->populate();
foreach ($rooms as $room) {
    if ($room->getName() == "KODI") {
        $kodiRoomId = $room->getId();
    }
}
开发者ID:eflye,项目名称:yana-plugins,代码行数:31,代码来源:install.php

示例5: execute

 /**
  * Save section.
  */
 function execute()
 {
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     if (isset($this->sectionId)) {
         $section =& $sectionDao->getSection($this->sectionId, $journalId);
     }
     if (!isset($section)) {
         $section = new Section();
         $section->setJournalId($journalId);
         $section->setSequence(REALLY_BIG_NUMBER);
     }
     $section->setTitle($this->getData('title'), null);
     // Localized
     $section->setAbbrev($this->getData('abbrev'), null);
     // Localized
     $reviewFormId = $this->getData('reviewFormId');
     if ($reviewFormId === '') {
         $reviewFormId = null;
     }
     $section->setReviewFormId($reviewFormId);
     $section->setMetaIndexed($this->getData('metaIndexed') ? 0 : 1);
     // #2066: Inverted
     $section->setMetaReviewed($this->getData('metaReviewed') ? 0 : 1);
     // #2066: Inverted
     $section->setAbstractsNotRequired($this->getData('abstractsNotRequired') ? 1 : 0);
     $section->setIdentifyType($this->getData('identifyType'), null);
     // Localized
     $section->setEditorRestricted($this->getData('editorRestriction') ? 1 : 0);
     $section->setHideTitle($this->getData('hideTitle') ? 1 : 0);
     $section->setHideAuthor($this->getData('hideAuthor') ? 1 : 0);
     $section->setHideAbout($this->getData('hideAbout') ? 1 : 0);
     $section->setDisableComments($this->getData('disableComments') ? 1 : 0);
     $section->setPolicy($this->getData('policy'), null);
     // Localized
     $section->setAbstractWordCount($this->getData('wordCount'));
     if ($section->getId() != null) {
         $sectionDao->updateSection($section);
         $sectionId = $section->getId();
     } else {
         $sectionId = $sectionDao->insertSection($section);
         $sectionDao->resequenceSections($journalId);
     }
     // Save assigned editors
     $assignedEditorIds = Request::getUserVar('assignedEditorIds');
     if (empty($assignedEditorIds)) {
         $assignedEditorIds = array();
     } elseif (!is_array($assignedEditorIds)) {
         $assignedEditorIds = array($assignedEditorIds);
     }
     $sectionEditorsDao =& DAORegistry::getDAO('SectionEditorsDAO');
     $sectionEditorsDao->deleteEditorsBySectionId($sectionId, $journalId);
     foreach ($this->sectionEditors as $key => $junk) {
         $sectionEditor =& $this->sectionEditors[$key];
         $userId = $sectionEditor->getId();
         // We don't have to worry about omit- and include-
         // section editors because this function is only called
         // when the Save button is pressed and those are only
         // used in other cases.
         if (in_array($userId, $assignedEditorIds)) {
             $sectionEditorsDao->insertEditor($journalId, $sectionId, $userId, Request::getUserVar('canReview' . $userId), Request::getUserVar('canEdit' . $userId));
         }
         unset($sectionEditor);
     }
 }
开发者ID:reconciler,项目名称:ojs,代码行数:69,代码来源:SectionForm.inc.php

示例6: setSection

 /**
  * Declares an association between this object and a Section object.
  *
  * @param      Section $v
  * @return     SectionHasItem The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setSection(Section $v = null)
 {
     // aggregate_column_relation behavior
     if (null !== $this->aSection && $v !== $this->aSection) {
         $this->oldSection = $this->aSection;
     }
     if ($v === null) {
         $this->setSectionId(NULL);
     } else {
         $this->setSectionId($v->getId());
     }
     $this->aSection = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Section object, it will not be re-added.
     if ($v !== null) {
         $v->addSectionHasItem($this);
     }
     return $this;
 }
开发者ID:therealchiko,项目名称:getchabooks,代码行数:26,代码来源:BaseSectionHasItem.php

示例7: Rank

 $configuration->put('PROGRAM_VERSION', '3.0.6');
 $configuration->put('HOME_PAGE', 'index.php');
 $configuration->put('VOCAL_SENSITIVITY', '0.0');
 //Création du rang admin
 $rank = new Rank();
 $rank->setLabel('admin');
 $rank->save();
 //Déclaration des sections du programme
 $sections = array('event', 'vocal', 'user', 'plugin', 'configuration', 'admin');
 //Création des sections déclarées et attribution de tous les droits sur toutes ces sections pour l'admin
 foreach ($sections as $sectionName) {
     $s = new Section();
     $s->setLabel($sectionName);
     $s->save();
     $r = new Right();
     $r->setSection($s->getId());
     $r->setRead('1');
     $r->setDelete('1');
     $r->setCreate('1');
     $r->setUpdate('1');
     $r->setRank($rank->getId());
     $r->save();
 }
 $personalities = array('John Travolta', 'Jeff Buckley', 'Tom Cruise', 'John Lennon', 'Emmet Brown', 'Geo trouvetou', 'Luke Skywalker', 'Mac Gyver', 'Marty McFly');
 $im = $personalities[rand(0, count($personalities) - 1)];
 list($fn, $n) = explode(' ', $im);
 //Creation du premier compte et assignation en admin
 $user->setMail($_POST['email']);
 $user->setPassword($_POST['password']);
 $user->setLogin($_POST['login']);
 $user->setFirstName($fn);
开发者ID:thib3113,项目名称:yana-server,代码行数:31,代码来源:install.php

示例8: Sensor

*/
require_once 'Sensor.class.php';
$table = new Sensor();
$table->create();
require_once 'SensorType.class.php';
$table2 = new SensorType();
$table2->create();
$s1 = new Section();
$s1->setLabel('sensor');
$s1->save();
$s2 = new Section();
$s2->setLabel('sensortypes');
$s2->save();
$r1 = new Right();
$r1->setSection($s1->getId());
$r1->setRead('1');
$r1->setDelete('1');
$r1->setCreate('1');
$r1->setUpdate('1');
$r1->setRank('1');
$r1->save();
$r2 = new Right();
$r2->setSection($s2->getId());
$r2->setRead('1');
$r2->setDelete('1');
$r2->setCreate('1');
$r2->setUpdate('1');
$r2->setRank('1');
$r2->save();
$conf = new Configuration();
$conf->put('plugin_sensor_receptor_pin', '0');
开发者ID:sachaw0lf,项目名称:yana-sensor-plugin,代码行数:31,代码来源:install.php

示例9: execute

 /**
  * Save section.
  */
 function execute()
 {
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     if (isset($this->sectionId)) {
         $section =& $sectionDao->getSection($this->sectionId, $journalId);
     }
     if (!isset($section)) {
         $section = new Section();
         $section->setJournalId($journalId);
         $section->setSequence(REALLY_BIG_NUMBER);
     }
     $section->setTitle($this->getData('title'), null);
     // Localized
     $section->setAbbrev($this->getData('abbrev'), null);
     // Localized
     // Added region
     // EL on Febraurt 11th 2013
     $section->setRegion($this->getData('region'), null);
     $reviewFormId = $this->getData('reviewFormId');
     if ($reviewFormId === '') {
         $reviewFormId = null;
     }
     $section->setReviewFormId($reviewFormId);
     $section->setMetaIndexed($this->getData('metaIndexed') ? 0 : 1);
     // #2066: Inverted
     $section->setMetaReviewed($this->getData('metaReviewed') ? 0 : 1);
     // #2066: Inverted
     $section->setAbstractsNotRequired($this->getData('abstractsNotRequired') ? 1 : 0);
     $section->setIdentifyType($this->getData('identifyType'), null);
     // Localized
     $section->setEditorRestricted($this->getData('editorRestriction') ? 1 : 0);
     $section->setHideTitle($this->getData('hideTitle') ? 1 : 0);
     $section->setHideAuthor($this->getData('hideAuthor') ? 1 : 0);
     $section->setHideAbout($this->getData('hideAbout') ? 1 : 0);
     $section->setDisableComments($this->getData('disableComments') ? 1 : 0);
     $section->setPolicy($this->getData('policy'), null);
     // Localized
     $section->setAbstractWordCount($this->getData('wordCount'));
     if ($section->getId() != null) {
         $sectionDao->updateSection($section);
         $sectionId = $section->getId();
     } else {
         $sectionId = $sectionDao->insertSection($section);
         $sectionDao->resequenceSections($journalId);
     }
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:51,代码来源:SectionForm.inc.php

示例10: prune

 /**
  * Exclude object from result
  *
  * @param     Section $section Object to remove from the list of results
  *
  * @return    SectionQuery The current query, for fluid interface
  */
 public function prune($section = null)
 {
     if ($section) {
         $this->addUsingAlias(SectionPeer::ID, $section->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
开发者ID:therealchiko,项目名称:getchabooks,代码行数:14,代码来源:BaseSectionQuery.php

示例11: filterBySection

 /**
  * Filter the query by a related Section object
  *
  * @param     Section|PropelCollection $section The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    SectionHasItemQuery The current query, for fluid interface
  */
 public function filterBySection($section, $comparison = null)
 {
     if ($section instanceof Section) {
         return $this->addUsingAlias(SectionHasItemPeer::SECTION_ID, $section->getId(), $comparison);
     } elseif ($section instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(SectionHasItemPeer::SECTION_ID, $section->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySection() only accepts arguments of type Section or PropelCollection');
     }
 }
开发者ID:therealchiko,项目名称:getchabooks,代码行数:21,代码来源:BaseSectionHasItemQuery.php


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