本文整理汇总了PHP中Portfolio::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Portfolio::all方法的具体用法?PHP Portfolio::all怎么用?PHP Portfolio::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Portfolio
的用法示例。
在下文中一共展示了Portfolio::all方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(Setting $settings = null, Portfolio $portfolio = null, Filesystem $filesystem = null)
{
$this->settings = $settings == null ? Setting::first() : $settings;
$this->portfolio = $portfolio == null ? Portfolio::all() : $portfolio;
$this->filesystem = $filesystem == null ? new Filesystem() : $filesystem;
\View::share('settings', $this->settings);
}
示例2: vistaListado
public function vistaListado()
{
$items_borrados = Item::where('estado', 'B')->lists('id');
if (count($items_borrados) > 0) {
$portfolios = Portfolio::whereNotIn('item_id', $items_borrados)->get();
} else {
$portfolios = Portfolio::all();
}
$categorias = Categoria::where('estado', 'A')->get();
$secciones = Seccion::where('estado', 'A')->get();
$this->array_view['portfolios'] = $portfolios;
$this->array_view['categorias'] = $categorias;
$this->array_view['secciones'] = $secciones;
//Hace que se muestre el html lista.blade.php de la carpeta item
//con los parametros pasados por el array
return View::make($this->folder_name . '.lista', $this->array_view);
}
示例3: display
/**
* Display the component.
*
* @return string
*/
function display()
{
if (!Portfolio::is_enabled()) {
return '';
}
$id = $this->id;
$tool = $this->tool;
$attributes = $this->attributes;
$attributes['z-index'] = 100000;
$s = ' ';
foreach ($attributes as $key => $value) {
$s .= $key . '="' . $value . '" ';
}
$result = array();
$result[] = '<span ' . $s . ' >';
$result[] = '<span class="dropdown" >';
$result[] = '<a href="#" data-toggle="dropdown" class="dropdown-toggle">';
$result[] = Display::return_icon('document_send.png', get_lang('Send'), array(), ICON_SIZE_SMALL) . '<b class="caret"></b>';
$result[] = '</a>';
$result[] = '<ul class="dropdown-menu">';
$portfolios = Portfolio::all();
foreach ($portfolios as $portfolio) {
$parameters = Uri::course_params();
$parameters[PortfolioController::PARAM_ACTION] = PortfolioController::ACTION_SHARE;
$parameters[PortfolioController::PARAM_CONTROLLER] = PortfolioController::NAME;
$parameters[PortfolioController::PARAM_PORTFOLIO] = $portfolio->get_name();
$parameters[PortfolioController::PARAM_SECURITY_TOKEN] = self::security_token();
$parameters[PortfolioController::PARAM_TOOL] = $this->get_tool();
$parameters[PortfolioController::PARAM_ID] = $id;
$parameters[PortfolioController::PARAM_TOOL] = $tool;
$url = Chamilo::url('/main/portfolio/share.php', $parameters);
$result[] = '<li>';
$result[] = '<a href="' . $url . '">' . $portfolio->get_title() . '</a>';
$result[] = '</li>';
}
$result[] = '</ul>';
$result[] = '</span>';
$result[] = '</span>';
return implode("\n", $result);
}
示例4: index
public function index()
{
return View::make("admin.{$this->name}.{$this->action}", ['items' => Portfolio::all(), 'name' => $this->name, 'action' => $this->action]);
}