示例#1
0
 function build_header()
 {
     return ax_fragment(ax_javascript_src('js/prototype.js'), ax_javascript_src('js/utils.js'), ax_img_src_alt(IMG_URL . "ssscrape-logo-horizontal.png", "Ssscrape monitor"));
 }
示例#2
0
 function build_header()
 {
     return ax_img_src_alt(IMG_URL . "ssscrape-logo-horizontal.png", "Ssscrape monitor");
 }
示例#3
0
/**
 * Create an image element with alt and title attributes.
 * \param $src Source for the image
 * \param $alt The alternative text for the image
 * \param $title The title for the image
 * \param $attributes Additional element attributes (optional)
 */
function ax_img_src_alt_title($src, $alt, $title, $attributes = null)
{
    $element = ax_img_src_alt($src, $alt, $attributes);
    $element->set_attribute('title', $title);
    return $element;
}
<?php

// Results in <p class="foo">Paragraph text</p> when rendered
$p = ax_p_class('Paragraph text', 'foo');
// The same can be achieved like this:
$p = ax_p('Paragraph text');
$p->set_class('foo');
// Results in <div id="bar">Text here</div> when rendered
$p = ax_div_id('Text here', 'bar');
// The same can be achieved like this:
$div = ax_div('Text here');
$div->set_attribute('id', 'bar');
// Hyperlinks can be built like this:
$link = ax_a_href('Hyperlink text', 'http://anewt.net');
$link = ax_a_href_title('Hyperlink text', 'http://anewt.net', 'This will be a tooltip');
// Images can be built like this:
$img = ax_img_src_alt('example.png', 'An example image');