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


PHP HTML::anchor方法代码示例

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


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

示例1: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        echo Form::open();
        ?>

<fieldset>
	<?php 
        echo Form::input_wrap('name', $this->blog_entry->name, array('class' => 'input-lg', 'placeholder' => __('Title')), null, Arr::get($this->errors, 'name'));
        ?>

	<?php 
        echo Form::textarea_wrap('content', $this->blog_entry->content, array('class' => 'input-lg', 'placeholder' => __('Content')), true, null, Arr::get($this->errors, 'content'), null, true);
        ?>
</fieldset>

<fieldset>
	<?php 
        echo Form::csrf();
        ?>
	<?php 
        echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-primary btn-lg'));
        ?>
	<?php 
        echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : '';
        ?>
</fieldset>

<?php 
        echo Form::close();
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:37,代码来源:edit.php

示例2: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        $gallery = $this->image->gallery();
        echo Form::open(Route::url('gallery_image', array('gallery_id' => Route::model_id($gallery), 'id' => $this->image->id, 'action' => 'report')), array('class' => Request::current()->is_ajax() ? 'ajaxify' : ''));
        ?>

<fieldset>

	<?php 
        echo Form::control_group(Form::input('reason', null, array('class' => 'input-block-level')), array('name' => __('Reason')), null, __('You can enter an optional reason for reporting this image, e.g. why it should be removed'));
        ?>

</fieldset>

<fieldset class="form-actions">
	<?php 
        echo Form::button('save', __('Report'), array('type' => 'submit', 'class' => 'btn btn-danger btn-large'));
        ?>
	<?php 
        echo Request::current()->is_ajax() ? '' : HTML::anchor(Route::url('gallery_image', array('gallery_id' => Route::model_id($gallery), 'id' => $this->image->id, 'action' => '')), __('Cancel'), array('class' => 'cancel'));
        ?>

	<?php 
        echo Form::csrf();
        ?>
</fieldset>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:36,代码来源:report.php

示例3: __construct

 /**
  * Create new shouts view.
  */
 public function __construct()
 {
     parent::__construct();
     $this->id = 'shouts';
     $this->title = HTML::anchor(Route::url('shouts'), __('Shouts'));
     $this->_can_shout = Permission::has(new Model_Shout(), Model_Shout::PERMISSION_CREATE);
 }
开发者ID:anqh,项目名称:anqh,代码行数:10,代码来源:shouts.php

示例4: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        if (!$this->blog_entries) {
            return '';
        }
        ob_start();
        ?>

<ul class="unstyled">

	<?php 
        foreach ($this->blog_entries as $entry) {
            ?>
	<li><?php 
            echo HTML::anchor(Route::model($entry), HTML::chars($entry->name));
            ?>
</li>
	<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:blog,代码行数:31,代码来源:list.php

示例5: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        ?>

<h2 id="introduction">Introduction</h2>

<p>
	Welcome to the ridiculously short developer documentation for klubitus!
</p>

<h2 id="anqh">Anqh</h2>

<p>
	Klubitus is an <em>almost</em> vanilla version of <?php 
        echo HTML::anchor('http://github.com/anqh/anqh', 'Anqh ' . Anqh::VERSION, array('class' => 'label label-info'));
        ?>
,
	an open source <?php 
        echo HTML::anchor('http://php.net', 'PHP 5.3', array('class' => 'label label-info'));
        ?>
 project built on top of <?php 
        echo HTML::anchor('http://kohanaframework.org', 'Kohana ' . Kohana::VERSION, array('class' => 'label label-info'));
        ?>
.
</p>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:35,代码来源:introduction.php

示例6: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        $tags = $this->group->tags();
        if (empty($tags)) {
            ?>

<div class="empty">
	<?php 
            echo __('No tags yet.');
            ?>
</div>

<?php 
        } else {
            ?>

<ul>
	<?php 
            foreach ($tags as $tag) {
                ?>
	<li><?php 
                echo HTML::anchor(Route::model($tag), $tag->name);
                ?>
</li>
	<?php 
            }
            ?>
</ul>

<?php 
        }
        echo Form::open();
        ?>

<fieldset>

	<?php 
        echo Form::control_group(Form::input('name', $this->group->name, array('class' => 'input-xxlarge', 'maxlength' => 32)), array('name' => __('Name')), Arr::get($this->errors, 'name'));
        ?>

	<?php 
        echo Form::control_group(Form::input('description', $this->group->description, array('class' => 'input-xxlarge')), array('description' => __('Short description')), Arr::get($this->errors, 'description'));
        ?>

</fieldset>

<fieldset class="form-actions">
	<?php 
        echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large'));
        ?>
	<?php 
        echo HTML::anchor(Request::back(Route::url('tags'), true), __('Cancel'), array('class' => 'cancel'));
        ?>
</fieldset>

<?php 
        echo Form::close();
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:core,代码行数:65,代码来源:taggroup.php

示例7: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        if (!$this->topics) {
            return '';
        }
        ob_start();
        ?>

<ul class="list-unstyled">

		<?php 
        foreach ($this->topics as $topic) {
            ?>
		<li>
			<?php 
            echo HTML::anchor(Route::model($topic, '?page=last#last'), Forum::topic($topic), array('title' => HTML::chars($topic->name)));
            ?>
		</li>
		<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:32,代码来源:list.php

示例8: user

 /**
  * 
  * @return string
  */
 public function user()
 {
     if (empty($this->user_id)) {
         return NULL;
     }
     return HTML::anchor(Route::get('backend')->uri(array('controller' => 'users', 'action' => 'profile', 'id' => $this->user->id)), $this->user->username);
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:11,代码来源:log.php

示例9: content

 /**
  * Render content.
  *
  * @return  string
  */
 public function content()
 {
     ob_start();
     // Stamp
     echo HTML::time(Date('l ', $this->event->stamp_begin) . Date::format('DDMMYYYY', $this->event->stamp_begin), $this->event->stamp_begin, true);
     // Location
     if ($this->event->venue) {
         echo ' @ ', HTML::anchor(Route::model($this->event->venue), HTML::chars($this->event->venue->name)), ', ', HTML::chars($this->event->venue->city_name);
     } elseif ($this->event->venue_name) {
         echo ' @ ', $this->event->venue_url ? HTML::anchor($this->event->venue_url, $this->event->venue_name) : HTML::chars($this->event->venue_name), $this->event->city_name ? ', ' . HTML::chars($this->event->city_name) : '';
     } elseif ($this->event->city_name) {
         echo ' @ ', HTML::chars($this->event->city_name);
     }
     // Flyer
     if ($flyer = $this->event->flyer()) {
         echo '<figure>', HTML::image($flyer->image_url(Model_Image::SIZE_THUMBNAIL)), '</figure>';
     } elseif ($this->event->flyer_front_url) {
         echo '<figure>', HTML::image($this->event->flyer_front_url, ['class' => 'img-responsive']), '</figure>';
     }
     // Favorites
     if ($this->event->favorite_count) {
         echo '<span class="stats"><i class="fa fa-heart"></i> ' . $this->event->favorite_count . '</span>';
     }
     return ob_get_clean();
 }
开发者ID:anqh,项目名称:anqh,代码行数:30,代码来源:hovercard.php

示例10: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        if (!$this->topics) {
            return '';
        }
        ob_start();
        ?>

<ul class="unstyled">

		<?php 
        foreach ($this->topics as $topic) {
            ?>
		<li>
			<small class="ago"><?php 
            echo HTML::time(Date::short_span($topic->last_posted, true), $topic->last_posted);
            ?>
</small>
			<?php 
            echo HTML::anchor(Route::model($topic), '<i class="muted iconic-upload"></i>', array('title' => __('First post')));
            ?>
			<?php 
            echo HTML::anchor(Route::model($topic, '?page=last#last'), HTML::chars($topic->name), array('title' => $topic->name));
            ?>
		</li>
		<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:forum,代码行数:39,代码来源:list.php

示例11: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        ?>

<ul class="thumbnails">

	<?php 
        foreach ($this->flyers as $flyer) {
            $name = $flyer->event ? $flyer->event->name : $flyer->name;
            ?>

	<li class="span2">
		<?php 
            echo HTML::anchor(Route::get('flyer')->uri(array('id' => $flyer->id)), HTML::image($flyer->image->get_url('thumbnail')), array('class' => 'thumbnail'));
            ?>

		<h4><?php 
            echo HTML::anchor(Route::get('flyer')->uri(array('id' => $flyer->id)), HTML::chars($name), array('title' => HTML::chars($name)));
            ?>
</h4>
	</li>

	<?php 
        }
        ?>

</ul>


<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:galleries,代码行数:38,代码来源:latest.php

示例12: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        $uri = Route::model($this->venue, 'combine');
        ?>

<ul class="unstyled">

	<?php 
        foreach ($this->venues as $venue) {
            ?>

	<li><?php 
            echo floor($venue['similarity']);
            ?>
% <?php 
            echo HTML::anchor($uri . '/' . $venue['venue']->id, HTML::chars($venue['venue']->name) . ', ' . HTML::chars($venue['venue']->city_name));
            ?>
</li>

	<?php 
        }
        ?>

</ul>

<?php 
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:venues,代码行数:34,代码来源:similar.php

示例13: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        echo Form::open();
        ?>

		<fieldset>
			<?php 
        echo Form::control_group(Form::input('name', $this->blog_entry->name, array('class' => 'input-xxlarge')), array('name' => __('Title')), Arr::get($this->errors, 'name'));
        ?>

			<?php 
        echo Form::control_group(Form::textarea_editor('content', $this->blog_entry->content, array('class' => 'input-xxlarge'), true), array('content' => __('Content')), Arr::get($this->errors, 'content'));
        ?>
		</fieldset>

		<fieldset class="form-actions">
			<?php 
        echo Form::csrf();
        ?>
			<?php 
        echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large'));
        ?>
			<?php 
        echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : '';
        ?>
		</fieldset>

<?php 
        echo Form::close();
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:blog,代码行数:37,代码来源:edit.php

示例14: content

    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        if (!count($this->notifications)) {
            echo new View_Alert(__('No new notifications.'), null, View_Alert::INFO);
        } else {
            ?>

<ul class="list-unstyled">

	<?php 
            foreach ($this->notifications as $id => $notification) {
                ?>
	<li><?php 
                echo HTML::anchor(Route::url('notifications') . '?dismiss=' . $id, '&times;', array('class' => 'close notification'));
                echo $notification;
                ?>
</li>
	<?php 
            }
            ?>

</ul>

<?php 
        }
        return ob_get_clean();
    }
开发者ID:anqh,项目名称:anqh,代码行数:33,代码来源:notifications.php

示例15: action_add

 function action_add()
 {
     if ($this->user->services->count_all() == 0) {
         $this->template->content = 'Увы, у вас нет ни одной компании чтобы добавить акцию. ' . HTML::anchor('cabinet/company/add', 'Добавить компанию');
     }
     $services = array();
     foreach ($this->user->services->find_all() as $service) {
         $services[$service->id] = $service->name;
     }
     if ($_POST) {
         $stock = ORM::factory('stock');
         try {
             $stock->values($_POST, array('text', 'service_id'));
             $stock->user_id = $this->user->id;
             $stock->active = 1;
             $stock->date = Date::formatted_time();
             $stock->save();
             // Обновляем дату редактирования у компании
             DB::update('services')->set(array('date_edited' => Date::formatted_time()))->where('id', '=', $stock->service_id)->execute();
             Message::set(Message::SUCCESS, 'Акция добавлена');
             $this->request->redirect('cabinet/stock');
         } catch (ORM_Validation_Exception $e) {
             $this->errors = $e->errors('models');
             $this->values = $_POST;
         }
     }
     $this->view = View::factory('frontend/cabinet/stock/form')->set('url', 'cabinet/stock/add')->set('values', $this->values)->set('errors', $this->errors)->set('services', $services);
     $this->template->title = $this->site_name . 'Добавление акции';
     $this->template->bc['#'] = 'Добавление акции';
     $this->template->content = $this->view;
 }
开发者ID:Alexander711,项目名称:naav1,代码行数:31,代码来源:stock.php


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