selectGalleries() public static method

Return a string containing an
public static selectGalleries ( array $params = [] ) : string
$params array An array of options:
  (integer)selected  The gallery_id of the gallery that is selected
  (integer)perm      The permissions filter to use [Horde_Perms::SHOW]
  (mixed)attributes  Restrict the galleries returned to those matching
                     the filters. Can be an array of attribute/values
                     pairs or a gallery owner username.
  (boolean)all_levels
  (integer)from      The gallery to start listing at.
  (integer)count     The number of galleries to return.
  (integer)ignore    An Ansel_Gallery id to ignore when building the tree.
return string The HTML to display the option list.
Example #1
0
            <?php 
    if ($this->option_copy) {
        ?>
              | <?php 
        echo $this->contentTag('a', _("Copy"), array('title' => _("Copy"), 'class' => 'widget', 'id' => 'anselgallery_copy'));
        ?>
            <?php 
    }
    ?>
            <select name="new_gallery">
              <option value="-1"><?php 
    echo _("Selected photos to");
    ?>
</option>
              <?php 
    echo Ansel::selectGalleries(array('perm' => Horde_Perms::EDIT));
    ?>
            </select>
          </td>
        </tr>
      </table>
    <?php 
}
?>
    <?php 
if (!$this->numTiles) {
    ?>
      <div class="text"><em><?php 
    echo _("There are no photos in this gallery.");
    ?>
</em></div>
Example #2
0
 /**
  * Returns a 'select' menu from the list of galleries created by
  * listGalleries().
  *
  * @param array $params  Optional parameters:
  *<pre>
  *  (string)scope      Application scope, if not default.
  *  (integer)selected  The gallery_id of the gallery that is selected
  *  (integer)perm      The permissions filter to use [Horde_Perms::SHOW]
  *  (mixed)filter      Restrict the galleries returned to those matching
  *                     the filters. Can be an array of attribute/values
  *                     pairs or a gallery owner username.
  *  (integer)parent    The parent share to start listing at.
  *  (integer)from      The gallery to start listing at.
  *  (integer)count     The number of galleries to return.
  *  (integer)ignore    An Ansel_Gallery id to ignore when building the tree.
  *</pre>
  */
 public function selectGalleries(array $params = array())
 {
     if (!empty($params['scope'])) {
         $GLOBALS['injector']->getInstance('Ansel_Config')->set('scope', $params['scope']);
         unset($params['scope']);
     }
     return Ansel::selectGalleries($params);
 }
Example #3
0
<table cellspacing="0">

<!-- Parent -->
<tr>
 <td class="rightAlign"><strong><?php 
echo _("Gallery Parent");
?>
</strong>&nbsp;</td>
 <td>
  <select name="gallery_parent" id="gallery_parent">
   <option value=""><?php 
echo _("Top Level Gallery");
?>
</option>
   <?php 
echo Ansel::selectGalleries(array('selected' => $this->properties['parent'], 'perm' => Horde_Perms::EDIT, 'ignore' => $this->properties['id']));
?>
  </select>
 </td>
</tr>

<!-- Display Mode -->
<tr>
  <td class="rightAlign"><strong><?php 
echo _("Display Mode");
?>
</strong></td>
  <td>
    <select name="view_mode">
     <option value="Normal" <?php 
echo empty($this->properties['mode']) || $this->properties['mode'] == 'Normal' ? 'selected="selected"' : '';