本文整理汇总了PHP中Link::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Link::__construct方法的具体用法?PHP Link::__construct怎么用?PHP Link::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Link
的用法示例。
在下文中一共展示了Link::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Creates a new image
* @param string $src
* @param boolean $rel_path
* @param string $alt
*/
public function __construct($src = '#', $rel_path = true, $alt = '')
{
parent::__construct();
$this->src = $src;
$this->rel_path = $rel_path;
$this->alt = $alt;
}
示例2: __construct
public function __construct($data)
{
parent::__construct($data);
if ('' == $this->name) {
$this->name = 'front-page-link';
}
$this->attributes['href'] = home_url();
}
示例3: __construct
public function __construct($id, Pageable $pageable, $page)
{
parent::__construct($id, function () {
});
Args::isNumeric($page, 'page');
$this->pageable = $pageable;
$this->page = $page;
}
示例4: __construct
/**
* @param string $href
* @param string $media
* */
public function __construct($href, $media = NULL)
{
parent::__construct($href, 'stylesheet');
$this->attr('type', 'text/css');
if (NULL != $media) {
$this->attr('media', $media);
}
}
示例5: __construct
public function __construct($data)
{
parent::__construct($data);
if ('' == $this->name) {
$this->name = 'postlink';
}
$this->attributes['href'] = get_permalink($this->post_object);
}
示例6: __construct
public function __construct($data)
{
parent::__construct($data);
if ('' == $this->name) {
$this->name = 'posts-page-link';
}
$this->attributes['href'] = get_permalink(get_option('page_for_posts'));
}
示例7: __construct
public function __construct()
{
parent::__construct(null, new Image("images/icones/xdcc.png"));
$url = new Url('index.php');
$url->setQueryVar("page", "xdcc");
parent::setUrl($url);
$this->setClass("xdccLink");
}
示例8: __construct
public function __construct(Partner $partner, $content = null)
{
parent::__construct($partner->getWebsiteUrl(), $content);
$this->partner = $partner;
if ($content == null) {
$this->setContent($partner->getName());
}
$this->openNewWindow(true);
}
示例9: __construct
public function __construct(Url $rssUrl, $content = null)
{
parent::__construct($rssUrl);
$rssImage = new Image('images/icones/rss.png', 'Flux RSS');
$rssImage->setClass('rss');
$this->setContent($rssImage);
$this->setMetaData('type', 'application/rss+xml');
$this->openNewWindow(true);
}
示例10: time
/**
* Return a linkCss object
*
* @param string $path
* @param string $options
* @return LinkCss
* @author Justin Palmer
*/
function __construct($path, $options = '')
{
$path = $path . '.css';
$app_path = Registry::get('pr-install-path');
if ($app_path != null) {
$path = $app_path . 'public/stylesheets/' . $path . '?' . time();
}
parent::__construct($path, $options);
}
示例11: __construct
public function __construct($label, $module_path, array $variables = null, $secure = false)
{
parent::__construct($label);
//$this->addIgnoreVariables('secure', 'variables', 'module_path');
$this->setModulePath($module_path);
if (!empty($variables)) {
$this->addVariables($variables);
}
$this->setSecure($secure);
}
示例12: __construct
public function __construct(Project $project)
{
parent::__construct();
$this->setProject($project);
}
示例13: __construct
/**
* @param string $href
* @param array $meta
*/
public function __construct($href, array $meta = [])
{
parent::__construct($href);
$this->meta = $meta;
}
示例14: __construct
public function __construct($cnn)
{
parent::__construct($cnn, self::$tableName, self::$tablePk, self::$tableValue0, self::$tableValue1);
}
示例15: __construct
/**
* Link One-One model field
* @param string $bind
* @param string $label
* @param boolean $primary
*/
public function __construct($bind = 'category', $label = 'Category', $model = 'CategoryHandler', $rightfield = 'id', $rightfieldlabel = 'name', $required = true, $primary = false)
{
parent::__construct($bind, $label, $model, $rightfield, $rightfieldlabel, $required, $primary);
$this->type = 'link-one-one';
}