Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function build()
 {
     $args = explode('/', Url::fromRoute('<current>'));
     if (($content = _follow_block_content('site')) && (\Drupal::config('follow.settings')->get('follow_site_block_user') || !($args[0] == 'user' && is_numeric($args[1])))) {
         return array('subject' => _follow_block_subject(), 'content' => $content);
     }
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function build()
 {
     $args = explode('/', Url::fromRoute('<current>'));
     $uid = $args[1];
     if ($args[0] == 'user' && is_numeric($uid) && ($content = _follow_block_content('user', $uid))) {
         return array('subject' => _follow_block_subject($uid), 'content' => $content);
     }
 }
 *   <?php endif; ?>
 * @endcode
 *
 * @see template_preprocess_search_block_form()
 */
?>
<div class="container-inline">
  <?php 
if (empty($variables['form']['#block']->subject)) {
    ?>
    <h2 class="element-invisible"><?php 
    print t('Search form');
    ?>
</h2>
  <?php 
}
?>
  <?php 
print $search_form;
?>
  <?php 
if (module_exists('follow') && $show_follow_links) {
    ?>
    <?php 
    print _follow_block_content();
    ?>
  <?php 
}
?>
</div>
 *   - $field->inline_html: either div or span based on the above flag.
 *   - $field->wrapper_prefix: A complete wrapper containing the inline_html to use.
 *   - $field->wrapper_suffix: The closing tag for the wrapper.
 *   - $field->separator: an optional separator that may appear before a field.
 *   - $field->label: The wrap label text to use.
 *   - $field->label_html: The full HTML of the label to use including
 *     configured element type.
 * - $row: The raw result object from the query, with all data it fetched.
 *
 * @ingroup views_templates
 */
 //dpm($row);
$uid = isset($row->users_node_uid) ? $row->users_node_uid : false;
//dpm($fields);
?>
<?php foreach ($fields as $id => $field): ?>
  <?php print $field->content; ?>
	<?php if($field->class == 'picture'): ?>
		<div class='auhtor-info'>
	<?php elseif ($field->class == 'field-bio'): ?>
		<?php if ($uid && module_exists('follow')) {
						print '<div id="author-social">' 
							.'<p class="follow-title">' . _follow_block_subject($uid) . '</p>' 
							. _follow_block_content($uid) 
							. '</div>';
						}
		?>
		</div>
	<?php endif; ?>
		
<?php endforeach; ?>