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


PHP backdrop_attributes函数代码示例

本文整理汇总了PHP中backdrop_attributes函数的典型用法代码示例。如果您正苦于以下问题:PHP backdrop_attributes函数的具体用法?PHP backdrop_attributes怎么用?PHP backdrop_attributes使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: materialize_select

function materialize_select($variables)
{
    $classes = array('browser-default');
    if (!isset($variables['element']['#attributes']['class'])) {
        $variables['element']['#attributes'] = array('class' => $classes);
    } else {
        $variables['element']['#attributes']['class'] = array_merge($variables['element']['#attributes']['class'], $classes);
    }
    return '<select' . backdrop_attributes($variables['element']['#attributes']) . '>' . form_select_options($variables['element']) . '</select>';
}
开发者ID:bixgomez,项目名称:osmarea.com,代码行数:10,代码来源:template.php

示例2: bartik_field__taxonomy_term_reference

/**
 * Implements theme_field__field_type().
 */
function bartik_field__taxonomy_term_reference($variables)
{
    $output = '';
    // Render the label, if it's not hidden.
    if (!$variables['label_hidden']) {
        $output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>';
    }
    // Render the items.
    $output .= $variables['element']['#label_display'] == 'inline' ? '<ul class="links inline">' : '<ul class="links">';
    foreach ($variables['items'] as $delta => $item) {
        $item_attributes = isset($variables['item_attributes'][$delta]) ? backdrop_attributes($variables['item_attributes'][$delta]) : '';
        $output .= '<li class="taxonomy-term-reference-' . $delta . '"' . $item_attributes . '>' . backdrop_render($item) . '</li>';
    }
    $output .= '</ul>';
    // Render the surrounding DIV with appropriate classes and attributes.
    if (!in_array('clearfix', $variables['classes'])) {
        $variables['classes'][] = 'clearfix';
    }
    $output = '<div class="' . implode(' ', $variables['classes']) . '"' . backdrop_attributes($variables['attributes']) . '>' . $output . '</div>';
    return $output;
}
开发者ID:thejimbirch,项目名称:backdropcms.org,代码行数:24,代码来源:template.php

示例3: implode

 * - $tabs: Tabs linking to any sub-pages beneath the current page
 *   (e.g., the view and edit tabs when displaying a node).
 * - $action_links: Array of actions local to the page, such as 'Add menu' on
 *   the menu administration interface.
 * - $classes: Array of CSS classes to be added to the layout wrapper.
 * - $attributes: Array of additional HTML attributes to be added to the layout
 *     wrapper. Flatten using backdrop_attributes().
 * - $content: An array of content, each item in the array is keyed to one
 *   region of the layout. This layout supports the following divs:
 */
?>
<div class="layout--juiced-up-full-screen-right container <?php 
print implode(' ', $classes);
?>
"<?php 
print backdrop_attributes($attributes);
?>
>
  <div id="skip-link">
    <a href="#main-content" class="element-invisible element-focusable"><?php 
print t('Skip to main content');
?>
</a>
  </div>

  <main class="l-wrapper container" role="main" aria-label="<?php 
print t('Main content');
?>
">
      <a id="main-content"></a>
开发者ID:backdrop-contrib,项目名称:juiced_up_layouts,代码行数:30,代码来源:layout--juiced-up-full-screen-right.tpl.php

示例4: implode

print implode(' ', $classes);
?>
"<?php 
print backdrop_attributes($attributes);
?>
>
  <div id="skip-link">
    <a href="#main-content" class="element-invisible element-focusable"><?php 
print t('Skip to main content');
?>
</a>
  </div>

  <div class="l-container">
    <main role="main"<?php 
print backdrop_attributes($main_attributes);
?>
>

      <div class="l-content-wrapper">

        <div class="l-content-top">
          <a id="main-content"></a>
          <?php 
print render($title_prefix);
?>
          <?php 
if ($title) {
    ?>
            <h1 class="title" id="page-title">
              <?php 
开发者ID:thejimbirch,项目名称:backdropcms.org,代码行数:31,代码来源:layout--double-fixed-inner.tpl.php

示例5: backdrop_attributes

    ?>
    <footer>
      <?php 
    print $user_picture;
    ?>
      <p class="submitted"><?php 
    print $submitted;
    ?>
</p>
    </footer>
  <?php 
}
?>

  <div class="content"<?php 
print backdrop_attributes($content_attributes);
?>
>
    <?php 
// We hide the links now so that we can render them later.
hide($content['links']);
print render($content);
?>
  </div>

  <?php 
print render($content['links']);
?>

  <?php 
if ($page && isset($comments['comments'])) {
开发者ID:serundeputy,项目名称:backdropcms.org,代码行数:31,代码来源:node.tpl.php

示例6: teamwork_15_subtheme_menu_link

/**
 * Implements theme_preprocess_menu_link().
 */
function teamwork_15_subtheme_menu_link(array $variables)
{
    $element = $variables['element'];
    $classes = array('pure-menu-item');
    $element['#attributes']['class'] = array_merge($element['#attributes']['class'], $classes);
    $sub_menu = '';
    if ($element['#below']) {
        $sub_menu = backdrop_render($element['#below']);
    }
    $output = l($element['#title'], $element['#href'], $element['#localized_options']);
    return '<li' . backdrop_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
}
开发者ID:backdrop-contrib,项目名称:teamwork_15,代码行数:15,代码来源:template.php

示例7: foreach

foreach ($rows as $row_count => $row) {
    ?>
      <tr <?php 
    if (!empty($row_classes[$row_count])) {
        print 'class="' . implode(' ', $row_classes[$row_count]) . '"';
    }
    ?>
>
        <?php 
    foreach ($row as $field => $content) {
        ?>
          <td <?php 
        if ($field_classes[$field][$row_count]) {
            print 'class="' . implode(' ', $field_classes[$field][$row_count]) . '" ';
        }
        print backdrop_attributes($field_attributes[$field][$row_count]);
        ?>
>
            <?php 
        print $content;
        ?>
          </td>
        <?php 
    }
    ?>
      </tr>
    <?php 
}
?>
  </tbody>
</table>
开发者ID:serundeputy,项目名称:backdropcms.org,代码行数:31,代码来源:views-view-table.tpl.php

示例8: zurb_foundation_6_subtheme_button

/**
 * Overwrite theme_button()
 */
function zurb_foundation_6_subtheme_button($variables)
{
    $element = $variables['element'];
    $element['#attributes']['type'] = 'submit';
    element_set_attributes($element, array('id', 'name', 'value'));
    $element['#attributes']['class'][] = 'form-' . $element['#button_type'];
    if (!empty($element['#attributes']['disabled'])) {
        $element['#attributes']['class'][] = 'form-button-disabled';
    }
    //custom class
    $element['#attributes']['class'][] = 'button';
    $element['#attributes']['class'][] = 'hollow';
    // $element['#attributes']['class'][] = 'radius';
    return '<input' . backdrop_attributes($element['#attributes']) . ' />';
}
开发者ID:backdrop-contrib,项目名称:zurb_foundation_6,代码行数:18,代码来源:template.php

示例9: afterlight_tribute_subtheme_form_element_label

/**
 * Overrides theme_form_element_label().
 */
function afterlight_tribute_subtheme_form_element_label(&$variables)
{
    $element = $variables['element'];
    $title = filter_xss_admin($element['#title']);
    // If the element is required, a required marker is appended to the label.
    $required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : '';
    //   // This is also used in the installer, pre-database setup.
    $t = get_t();
    $attributes = array();
    if (!empty($element['#id'])) {
        $attributes['for'] = $element['#id'];
    }
    $output = '';
    if (isset($variables['#children'])) {
        if ($element['#type'] === "radio") {
            $output .= $variables['#children'];
        }
        if ($element['#type'] === "checkbox") {
            $output .= $variables['#children'];
        }
    }
    return ' <label' . backdrop_attributes($attributes) . '></label><div>' . $t('!title', array('!title' => $title)) . "</div> \n";
}
开发者ID:backdrop-contrib,项目名称:afterlight_tribute,代码行数:26,代码来源:template.php

示例10: backdrop_get_css

?>
    <title><?php 
print $head_title;
?>
</title>
    <?php 
print backdrop_get_css();
?>
    <?php 
print backdrop_get_js();
?>
  </head>
  <body class="<?php 
print implode(' ', $classes);
?>
"<?php 
print backdrop_attributes($body_attributes);
?>
>
    <?php 
print $page;
?>
    <?php 
print $page_bottom;
?>
    <?php 
print backdrop_get_js('footer');
?>
  </body>
</html>
开发者ID:serundeputy,项目名称:backdropcms.org,代码行数:30,代码来源:page.tpl.php

示例11: borg_menu_link

/**
 * Overrides theme_menu_link().
 */
function borg_menu_link(array $variables)
{
    $element = $variables['element'];
    $sub_menu = '';
    if ($element['#below']) {
        $sub_menu = backdrop_render($element['#below']);
    }
    $menu_name = isset($element['#original_link']['menu_name']) ? $element['#original_link']['menu_name'] : NULL;
    if ($menu_name === 'main-menu' || $menu_name === 'menu-handbook') {
        // Add the font awesome icon.
        if ($element['#href']) {
            $element['#title'] .= ' <i class="fa fa-forward fa-fw"></i>';
            $element['#localized_options']['html'] = TRUE;
        }
        // If this is the handbook link and we're on a book page, set an active class.
        if ($element['#href'] === 'node/1') {
            $node = menu_get_object();
            if (isset($node) && isset($node->type) && $node->type === 'book') {
                $element['#attributes']['class'][] = 'active';
            }
        }
    }
    $output = l($element['#title'], $element['#href'], $element['#localized_options']);
    return '<li' . backdrop_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
}
开发者ID:thejimbirch,项目名称:backdropcms.org,代码行数:28,代码来源:template.php

示例12: afterlight_tribute_menu_link

function afterlight_tribute_menu_link(array $variables)
{
    $element = $variables['element'];
    $sub_menu = '';
    if ($element['#below']) {
        $sub_menu = backdrop_render($element['#below']);
    }
    $output = l($element['#title'], $element['#href'], $element['#localized_options']);
    return '<li' . backdrop_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
}
开发者ID:backdrop-contrib,项目名称:afterlight_tribute,代码行数:10,代码来源:template.php

示例13: backdrop_attributes

/**
 * @file
 * Default theme implementation to display a single Backdrop page while offline.
 *
 * All the available variables are mirrored in html.tpl.php and page.tpl.php.
 * Some may be blank but they are provided for consistency.
 *
 * @see template_preprocess()
 * @see template_preprocess_maintenance_page()
 *
 * @ingroup themeable
 */
?>
<!DOCTYPE html>
<html<?php 
print backdrop_attributes($html_attributes);
?>
>

<head>
  <?php 
print backdrop_get_html_head();
?>
  <title><?php 
print $head_title;
?>
</title>
  <?php 
print backdrop_get_css();
?>
  <?php 
开发者ID:serundeputy,项目名称:backdropcms.org,代码行数:31,代码来源:maintenance-page.tpl.php

示例14: backdrop_attributes

    ?>
    <div class="field-label"><?php 
    print $label;
    ?>
:&nbsp;</div>
  <?php 
}
?>
  <div class="field-items"<?php 
print backdrop_attributes($content_attributes);
?>
>
    <?php 
foreach ($items as $delta => $item) {
    ?>
      <div class="field-item <?php 
    print $delta % 2 ? 'odd' : 'even';
    ?>
"<?php 
    print backdrop_attributes($item_attributes[$delta]);
    ?>
><?php 
    print render($item);
    ?>
</div>
    <?php 
}
?>
  </div>
</div>
开发者ID:serundeputy,项目名称:backdropcms.org,代码行数:30,代码来源:field.tpl.php


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