samples/PhotoAlbum/lib/rb.php
public function tagged( $beanType, $tagList ) {
		if ($tagList!==false && !is_array($tagList)) $tags = explode( ",", (string)$tagList); else $tags=$tagList;
		$collection = array();
		$tags = $this->redbean->find('tag',array('title'=>$tags));
		if (is_array($tags) && count($tags)>0) {
			$collectionKeys = $this->associationManager->related($tags,$beanType);
			if ($collectionKeys) {
				$collection = $this->redbean->batch($beanType,$collectionKeys);
			}
		}
		return $collection;
	}
public function tagged( $beanType, $tagList ) {
		if ($tagList!==false && !is_array($tagList)) $tags = explode( ",", (string)$tagList); else $tags=$tagList;
		$collection = array();
		$tags = $this->redbean->find('tag',array('title'=>$tags));
		if (is_array($tags) && count($tags)>0) {
			$collectionKeys = $this->associationManager->related($tags,$beanType);
			if ($collectionKeys) {
				$collection = $this->redbean->batch($beanType,$collectionKeys);
			}
		}
		return $collection;
	}
public function tagged ( $ beanType , $ tagList ) { if ( $ tagList !== false && ! is_array ( $ tagList ) ) $ tags = explode ( "," , ( string ) $ tagList ) ; else $ tags = $ tagList ; $ collection = array ( ) ; $ tags = $ this -> redbean -> find ( 'tag' , array ( 'title' => $ tags ) ) ; if ( is_array ( $ tags ) && count ( $ tags ) > 0 ) { $ collectionKeys = $ this -> associationManager -> related ( $ tags , $ beanType ) ; if ( $ collectionKeys ) { $ collection = $ this -> redbean -> batch ( $ beanType , $ collectionKeys ) ; } } return $ collection ; }
Part of RedBeanPHP Tagging API.
Returns all beans that have been tagged with one of the tags given.

@param  $beanType type of bean you are looking for
@param  $tagList  list of tags to match

@return array
Part of RedBeanPHP Tagging API . Returns all beans that have been tagged with one of the tags given .