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


PHP Portfolio類代碼示例

本文整理匯總了PHP中Portfolio的典型用法代碼示例。如果您正苦於以下問題:PHP Portfolio類的具體用法?PHP Portfolio怎麽用?PHP Portfolio使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: setByData

 public function setByData($data)
 {
     foreach ($data as $portfolioData) {
         $portfolio = new Portfolio();
         $portfolio->setByData($portfolioData);
         $this->_portfolios[] = $portfolio;
     }
 }
開發者ID:albertfajarito,項目名稱:dwh-revenue-monitoring,代碼行數:8,代碼來源:PortfolioColl.php

示例2: addPortfolio

 static function addPortfolio($fields)
 {
     extract($fields);
     $portfolio = new Portfolio();
     $portfolio->name = $name;
     $portfolio->owner = $owner;
     $portfolio->created = common_sql_now();
     $portfolio->modified = common_sql_now();
     $result = $portfolio->insert();
     if (!$result) {
         common_log_db_error($portfolio, 'INSERT', __FILE__);
         return false;
     }
     return $portfolio;
 }
開發者ID:himmelex,項目名稱:NTW,代碼行數:15,代碼來源:Portfolio.php

示例3: frameResponse

 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $actionBar = new \Widgets\ActionBar();
     $this->getExtension()->addJS();
     $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("newArtefacts"), "ajax" => array("onclick" => array("command" => "newArtefactForm", "namespace" => "portfolio", "params" => "", "requestType" => "popup")))));
     //		array("name" => "Bild anfügen<img src=\"{$editIcon}\">", "command" => "EditMessageImage", "namespace" => "forum", "params" => "{'messageObjectId':'{$this->id}','forum':'{$forumId}'}", "type" => "popup");
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Artefacts"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Competences"), "link" => $this->getExtension()->getExtensionUrl() . "ViewChart/"), array("name" => \Portfolio::getInstance()->getText("Artefacts"), "link" => $this->getExtension()->getExtensionUrl() . "ManageArtefacts/")));
     $tabBar->setActiveTab(2);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("artefactsWrapper");
     $loader->setMessage("loading artefacts ...");
     $loader->setCommand("loadArtefacts");
     $loader->setParams($this->params);
     $loader->setElementId("artefactsWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Manage Artefacts");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
開發者ID:rolwi,項目名稱:koala,代碼行數:28,代碼來源:ManageArtefacts.class.php

示例4: frameResponse

 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Portfolios"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("portfoliosWrapper");
     $loader->setMessage("loading portfolios ...");
     $loader->setCommand("loadPortfolios");
     $loader->setParams(array());
     $loader->setElementId("portfoliosWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Manage Portfolios");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
開發者ID:rolwi,項目名稱:koala,代碼行數:26,代碼來源:ManagePortfolios.class.php

示例5: frameResponse

 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portfolio = \PortfolioModel::getById($this->portfolioId);
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("link" => "javascript:history.back()", "name" => "zurück"), array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Belege des Portfolios »" . $portfolio->getName() . "«"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("artefactsWrapper");
     $loader->setMessage("loading artefacts ...");
     $loader->setCommand("loadArtefacts");
     $loader->setParams(array(0 => $this->portfolioId));
     $loader->setElementId("artefactsWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Belege verwalten");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
開發者ID:rolwi,項目名稱:koala,代碼行數:27,代碼來源:ViewPortfolio.class.php

示例6: testDeleteHabtmReferenceWithConditions

 /**
  * testDeleteHabtmReferenceWithConditions method
  *
  * @return void
  */
 public function testDeleteHabtmReferenceWithConditions()
 {
     $this->loadFixtures('Portfolio', 'Item', 'ItemsPortfolio', 'Syfile', 'Image');
     $Portfolio = new Portfolio();
     $Portfolio->hasAndBelongsToMany['Item']['conditions'] = array('ItemsPortfolio.item_id >' => 1);
     $result = $Portfolio->find('first', array('conditions' => array('Portfolio.id' => 1)));
     $expected = array(array('id' => 3, 'syfile_id' => 3, 'published' => false, 'name' => 'Item 3', 'ItemsPortfolio' => array('id' => 3, 'item_id' => 3, 'portfolio_id' => 1)), array('id' => 4, 'syfile_id' => 4, 'published' => false, 'name' => 'Item 4', 'ItemsPortfolio' => array('id' => 4, 'item_id' => 4, 'portfolio_id' => 1)), array('id' => 5, 'syfile_id' => 5, 'published' => false, 'name' => 'Item 5', 'ItemsPortfolio' => array('id' => 5, 'item_id' => 5, 'portfolio_id' => 1)));
     $this->assertEquals($expected, $result['Item']);
     $result = $Portfolio->ItemsPortfolio->find('all', array('conditions' => array('ItemsPortfolio.portfolio_id' => 1)));
     $expected = array(array('ItemsPortfolio' => array('id' => 1, 'item_id' => 1, 'portfolio_id' => 1)), array('ItemsPortfolio' => array('id' => 3, 'item_id' => 3, 'portfolio_id' => 1)), array('ItemsPortfolio' => array('id' => 4, 'item_id' => 4, 'portfolio_id' => 1)), array('ItemsPortfolio' => array('id' => 5, 'item_id' => 5, 'portfolio_id' => 1)));
     $this->assertEquals($expected, $result);
     $Portfolio->delete(1);
     $result = $Portfolio->find('first', array('conditions' => array('Portfolio.id' => 1)));
     $this->assertFalse($result);
     $result = $Portfolio->ItemsPortfolio->find('all', array('conditions' => array('ItemsPortfolio.portfolio_id' => 1)));
     $this->assertEquals(array(), $result);
 }
開發者ID:pritten,項目名稱:SmartCitizen.me,代碼行數:22,代碼來源:ModelDeleteTest.php

示例7: loadModel

 public function loadModel($id)
 {
     $model = Portfolio::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
開發者ID:syukrikhafidh,項目名稱:appdefault,代碼行數:8,代碼來源:PageController.php

示例8: removePortfolio

 public function removePortfolio($id)
 {
     $pf = Portfolio::getPfById($id);
     if ($pf && $pf->verifyOwner($this->userID)) {
         return $pf->removePf();
     }
     return false;
 }
開發者ID:idoqo,項目名稱:yedoe,代碼行數:8,代碼來源:Student.php

示例9: mobileValue

function mobileValue($a, $b)
{
    if (Portfolio::isMobile()) {
        echo $a;
    } else {
        echo $b;
    }
}
開發者ID:Xipiryon,項目名稱:Portfolio,代碼行數:8,代碼來源:timeline.php

示例10: remove_portfolio

 public function remove_portfolio($portfolioId = NULL)
 {
     if (!$this->securitypolicy->validateAccessRight(3, 'remove')) {
         $this->load->view('access_denied');
     }
     if ($this->input->post('portfolio-id')) {
         $portfolioId = $this->input->post('portfolio-id');
     }
     if (isset($portfolioId)) {
         $portfolio = new Portfolio();
         $portfolio->remove($portfolioId);
         $this->session->set_userdata(array('status' => 'success'));
         redirect(site_url('Admin/view_hotel_portfolio_list'));
     } else {
         show_error('Portfolio ID is missing');
     }
 }
開發者ID:albertfajarito,項目名稱:dwh-revenue-monitoring,代碼行數:17,代碼來源:Portfolios.php

示例11: prepare

 function prepare($args)
 {
     parent::prepare($args);
     $this->nickname = common_canonical_nickname($this->arg('nickname'));
     $this->user = User::staticGet('nickname', $this->nickname);
     $this->portfolio = Portfolio::staticGet('id', $this->arg('id'));
     return true;
 }
開發者ID:himmelex,項目名稱:NTW,代碼行數:8,代碼來源:viewimage.php

示例12: getByName

 /**
  * Set getter by name
  * 
  * @param string $name The set filename
  * @return Smak\Portfolio\Set | null
  */
 public function getByName($name)
 {
     parent::getByName($name);
     foreach ($this->getIterator() as $file_info) {
         if ($name == $file_info->getFilename()) {
             return new Set($file_info);
         }
     }
 }
開發者ID:eexit,項目名稱:smak,代碼行數:15,代碼來源:Collection.php

示例13: actionAddToGallery

    public function actionAddToGallery($modelPk, $imageName)
	{
		$img = new ImageGallery('create');
		$img->image_name = $imageName;
		$img->{Portfolio::getIdAttr()} = $modelPk;
		$img->makeThumb();
		$img->save();

		echo CJSON::encode(array('pk'=>$img->pk));
	}
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:10,代碼來源:ImageGalleryController.php

示例14: relations

 public function relations()
 {
    return CMap::mergeArray(parent::relations(), array(
        'portfolioWorks' => array(self::MANY_MANY, 'PortfolioWork', 'portfolio_works_relations(portfolio_id, portfolio_work_id)'),
        'gallery' => array(self::HAS_MANY, 'PortfolioGallery', Portfolio::getIdAttr(),
            'order'=>'gallery.sort ASC'
        ),
        'city' => array(self::BELONGS_TO, 'City', City::getIdAttr()),
        'workType' => array(self::BELONGS_TO, 'PortfolioWorkType', PortfolioWorkType::getIdAttr()),
    ));
 }
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:11,代碼來源:Product.php

示例15: envPortfolio

 protected function envPortfolio()
 {
     $portfolio = new Portfolio();
     $portfolio->picture = 'img/uploaded/2.jpg';
     $portfolio->title = 'My Project';
     $portfolio->description = 'This is my cute dog.';
     $portfolio->template_id = 1;
     $portfolio->save();
     $portfolio = new Portfolio();
     $portfolio->picture = 'img/uploaded/park.jpeg';
     $portfolio->title = 'My Project';
     $portfolio->description = 'This is my favorite park';
     $portfolio->template_id = 1;
     $portfolio->save();
     $portfolio2 = new Portfolio();
     $portfolio2->picture = 'img/uploaded/2.jpg';
     $portfolio2->title = 'My dog';
     $portfolio2->description = 'He is a cutie';
     $portfolio2->template_id = 2;
     $portfolio2->save();
     $portfolio21 = new Portfolio();
     $portfolio21->picture = 'img/uploaded/park.jpeg';
     $portfolio21->title = 'Best Park';
     $portfolio21->description = 'This is my favorite park';
     $portfolio21->template_id = 2;
     $portfolio21->save();
     $portfolio3 = new Portfolio();
     $portfolio3->picture = 'img/uploaded/2.jpg';
     $portfolio3->title = 'My Project';
     $portfolio3->description = 'Its pretty awesome';
     $portfolio3->template_id = 3;
     $portfolio3->save();
     $portfolio31 = new Portfolio();
     $portfolio31->picture = 'img/uploaded/park.jpeg';
     $portfolio31->title = 'My Project';
     $portfolio31->description = 'This is my favorite park';
     $portfolio31->template_id = 3;
     $portfolio31->save();
 }
開發者ID:resumeproductions,項目名稱:Resume-Solutions,代碼行數:39,代碼來源:PortfoliosTableSeeder.php


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