本文整理汇总了PHP中Portfolio类的典型用法代码示例。如果您正苦于以下问题:PHP Portfolio类的具体用法?PHP Portfolio怎么用?PHP Portfolio使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Portfolio类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: getWidget
public function getWidget()
{
$box = new \Widgets\Box();
$box->setId(\PortfolioHome::getInstance()->getId());
$box->setTitle(\Portfolio::getInstance()->getText("Your Portfolio"));
$box->setTitleLink(PATH_URL . "portfolio/");
$box->setContent(<<<END
Hund
END
);
$box->setContentMoreLink(PATH_URL . "portfolio/");
return $box;
}
开发者ID:rolwi,项目名称:koala,代码行数:13,代码来源:PortfolioHome.extension.php
示例17: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$all = Lookup::model()->getAll();
Y::dump($all);
$model = new Portfolio('search');
$model->unsetAttributes(); // clear any default values
$model = $model->current($cat);
if (isset($_GET['Portfolio']))
$model->attributes=$_GET['Portfolio'];
if (isset($_GET['ajax'])) {
$this->renderPartial('admingrid',array(
'model'=>$model,
));
} else {
$this->render('admin',array(
'model'=>$model,
'cat'=>$cat
));
}
}
开发者ID:nizsheanez,项目名称:PolymorphCMS,代码行数:25,代码来源:SettingsController.php
示例18: actionDelete
public function actionDelete($id)
{
$user = User::model()->findByPk((int) $id);
//delete all portfolio of specified company
$criteria = new CDbCriteria();
$idcompany = (int) $user->company->id;
$criteria->condition = "company_id={$idcompany}";
Portfolio::model()->deleteAll($criteria);
// delelte company
Company::model()->deleteByPk($idcompany);
// delete user
$user->delete();
}
开发者ID:limmer3,项目名称:instagress,代码行数:13,代码来源:DashboardController.php
示例19: __construct
/**
* Portfolio constructor.
* @param array $config
*/
public function __construct(array $config)
{
Portfolio::$app = $this;
$this->config = $config;
$this->slim = new \Slim\Slim(['view' => new \Slim\Views\Twig()]);
$this->slim->view()->parserOptions = array('debug' => $config['debug'], 'cache' => $config['twig']['cacheDir']);
$this->slim->view()->parserExtensions = array(new \Slim\Views\TwigExtension());
$this->slim->view()->setTemplatesDirectory($config['twig']['templatesDir']);
$this->client = new \ApiClient\Client($config['vk']);
$this->storage = new \Storage\Storage(new \Predis\Client($config['redis']));
$group = $this->storage->getById(new \Model\Group(), -$config['vk']['owner_id']);
$this->slim->view()->appendData(['Group' => $group]);
$this->slim->view()->appendData(['Meta' => $this->getMetaData($config['meta'])]);
}
开发者ID:alexdevid,项目名称:darinaerde,代码行数:18,代码来源:Portfolio.php
示例20: actionIndex
public function actionIndex()
{
$type = Type::model()->findAll();
$skill = Skill::model()->findAll();
$usr = User::model()->findbyPk(1);
$criteria = new CDbCriteria();
$criteria->select = '*';
$criteria->order = 'rand()';
$total = Portfolio::model()->count();
$pages = new CPagination($total);
$pages->pageSize = 10;
$pages->applyLimit($criteria);
$port = Portfolio::model()->findAll($criteria);
$this->render('index', array('type' => $type, 'port' => $port, 'pages' => $pages, 'skill' => $skill, 'usr' => $usr));
}
开发者ID:syukrikhafidh,项目名称:appdefault,代码行数:15,代码来源:SiteController.php
注:本文中的Portfolio类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论