Public Member Functions | Data Fields

ilPaymentObjectSelector Class Reference

Inheritance diagram for ilPaymentObjectSelector:
Collaboration diagram for ilPaymentObjectSelector:

Public Member Functions

 ilPaymentObjectSelector ($a_target, $a_classname)
 Constructor public.
 buildLinkTarget ($a_node_id, $a_type)
 get link target (may be overwritten by derived classes)
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get frame target (may be overwritten by derived classes)
 isClickable ($a_type, $a_ref_id)
 check if links for certain object type are activated
 setAlwaysClickable ($a_value)
 showChilds ($a_ref_id)
 determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g.
 formatHeader ($a_obj_id, $a_option)
 overwritten method from base class public

Data Fields

 $root_id
 $output
 $ctrl
 $selectable_type
 $ref_id
 $classname

Detailed Description

Definition at line 37 of file class.ilPaymentObjectSelector.php.


Member Function Documentation

ilPaymentObjectSelector::buildFrameTarget ( a_type,
a_child = 0,
a_obj_id = 0 
)

get frame target (may be overwritten by derived classes)

Reimplemented from ilExplorer.

Definition at line 102 of file class.ilPaymentObjectSelector.php.

        {
                return '';
        }

ilPaymentObjectSelector::buildLinkTarget ( a_node_id,
a_type 
)

get link target (may be overwritten by derived classes)

Reimplemented from ilExplorer.

Definition at line 83 of file class.ilPaymentObjectSelector.php.

        {
                $this->ctrl->setParameterByClass($this->classname,'sell_id',$a_node_id);
                
                if ($this->classname == 'ilpaymentstatisticgui')
                {
                        return $this->ctrl->getLinkTargetByClass($this->classname,'searchUser');
                }
                if ($this->classname == 'ilobjpaymentsettingsgui')
                {
                        return $this->ctrl->getLinkTargetByClass($this->classname,'searchUserSP');
                }
                else
                {
                        return $this->ctrl->getLinkTargetByClass($this->classname,'showSelectedObject');
                }

        }

ilPaymentObjectSelector::formatHeader ( a_obj_id,
a_option 
)

overwritten method from base class public

Parameters:
integer obj_id
integer array options
Returns:
string

Definition at line 207 of file class.ilPaymentObjectSelector.php.

References ilExplorer::$ilias, $lng, and $tpl.

        {
                global $lng, $ilias;

                $tpl = new ilTemplate("tpl.tree.html", true, true);

                $tpl->setCurrentBlock("text");
                $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
                $tpl->parseCurrentBlock();

                $tpl->setCurrentBlock("row");
                $tpl->parseCurrentBlock();

                $this->output[] = $tpl->get();
        }

ilPaymentObjectSelector::ilPaymentObjectSelector ( a_target,
a_classname 
)

Constructor public.

Parameters:
string scriptname
int user_id

Definition at line 59 of file class.ilPaymentObjectSelector.php.

References $ilCtrl, ilExplorer::$tree, ilExplorer::addFilter(), ilExplorer::ilExplorer(), ilExplorer::setFiltered(), ilExplorer::setFilterMode(), and ilExplorer::setSessionExpandVariable().

        {
                global $tree,$ilCtrl;

                $this->ctrl = $ilCtrl;

                parent::ilExplorer($a_target);
                $this->tree = $tree;
                $this->root_id = $this->tree->readRootId();
                $this->order_column = "title";

                $this->setSessionExpandVariable("paya_link_expand");

                $this->addFilter("adm");
                $this->addFilter("rolf");
                $this->addFilter("chat");
                #$this->addFilter('fold');

                $this->setFilterMode(IL_FM_NEGATIVE);
                $this->setFiltered(true);

                $this->classname = $a_classname;
        }

Here is the call graph for this function:

ilPaymentObjectSelector::isClickable ( a_type,
a_ref_id 
)

check if links for certain object type are activated

Parameters:
string $a_type object type
Returns:
boolean true if linking is activated

Reimplemented from ilExplorer.

Definition at line 107 of file class.ilPaymentObjectSelector.php.

References ilPaymentObject::_isPurchasable().

        {
                global $ilUser;

                switch($a_type)
                {
                        case 'lm':
                        case 'crs':
                        case 'tst':
                        case 'sahs':
                        case 'file':

                                ;
                                break;
                        default:
                                return false;
                }


                if ($this->classname == 'ilpaymentstatisticgui')
                {
                        if (!ilPaymentObject::_isPurchasable($a_ref_id, $ilUser->getId()))
                        {
                                return true;
                        }
                }
                else if ($this->classname == 'ilobjpaymentsettingsgui')
                {
                        if (!ilPaymentObject::_isPurchasable($a_ref_id))
                        {
                                return true;
                        }
                }
                else
                {
                        if (ilPaymentObject::_isPurchasable($a_ref_id))
                        {
                                return true;
                        }
                }
                return false;
                
        }

Here is the call graph for this function:

ilPaymentObjectSelector::setAlwaysClickable ( a_value  ) 

Definition at line 151 of file class.ilPaymentObjectSelector.php.

        {
                $this->always_clickable = $a_value;
        }

ilPaymentObjectSelector::showChilds ( a_parent_id  ) 

determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g.

ilRepositoryExplorerGUI)

Reimplemented from ilExplorer.

Definition at line 156 of file class.ilPaymentObjectSelector.php.

References $rbacsystem, and ilPaymentObject::_isPurchasable().

        {
                global $rbacsystem;

                return true;

                if ($a_ref_id == 0)
                {
                        return true;
                }

                if ($this->classname == 'ilpaymentstatisticgui')
                {
                        if (!ilPaymentObject::_isPurchasable($a_ref_id, $ilUser->getId()))
                        {
                                return false;
                        }
                }
                else if ($this->classname == 'ilobjpaymentsettingsgui')
                {
                        if (!ilPaymentObject::_isPurchasable($a_ref_id))
                        {
                                return false;
                        }
                }
                else
                {
                        if (!ilPaymentObject::_isPurchasable($a_ref_id))
                        {
                                return false;
                        }
                }

                if($rbacsystem->checkAccess("visible", $a_ref_id))
                {
                        return true;
                }
                else
                {
                        return false;
                }
        }

Here is the call graph for this function:


Field Documentation

ilPaymentObjectSelector::$classname

Definition at line 52 of file class.ilPaymentObjectSelector.php.

ilPaymentObjectSelector::$ctrl

Definition at line 47 of file class.ilPaymentObjectSelector.php.

ilPaymentObjectSelector::$output

Reimplemented from ilExplorer.

Definition at line 46 of file class.ilPaymentObjectSelector.php.

ilPaymentObjectSelector::$ref_id

Definition at line 50 of file class.ilPaymentObjectSelector.php.

ilPaymentObjectSelector::$root_id

Definition at line 45 of file class.ilPaymentObjectSelector.php.

ilPaymentObjectSelector::$selectable_type

Definition at line 49 of file class.ilPaymentObjectSelector.php.


The documentation for this class was generated from the following file: