}
}
+ public function getCondition($promo)
+ {
+ return new UFC_Promo(UserFilterCondition::OP_EQUALS, $this->grade, $promo);
+ }
+
public function export()
{
$export = $this->buildExport('promo');
* @param $particle Set to true if particles should be included in the sorting order
* @param $desc If sort order should be descending
*/
-class UFO_Name extends PlFilterOrder
+class UFO_Name extends PlFilterGroupableOrder
{
private $type;
private $variant;
}
}
+ public function getGroupToken(PlFilter $pf)
+ {
+ return 'SUBSTRING(' . $this->_tokens . ', 1, 1)';
+ }
+
+ public function getCondition($initial)
+ {
+ if (Profile::isDisplayName($this->type)) {
+ switch ($this->type) {
+ case Profile::DN_PRIVATE:
+ case Profile::DN_SHORT:
+ case Profile::DN_YOURSELF:
+ $type = Profile::FIRSTNAME;
+ default:
+ $type = Profile::LASTNAME;
+ }
+ } else {
+ $type = $this->type;
+ }
+ return new UFC_Name($type, $initial, UFC_Name::PREFIX);
+ }
+
public function export()
{
$export = $this->buildExport($this->type);