What is this

Hey,

Dont even know what to name the title. Im trying to figure out, how all this works and what does all this mean: [B]$oView->getArticleList()[/B]
$ = variable?
() = function?
-> = ?
how do i find out, what oView and getArticleList contains?
how do i get the info from getCategory ? at times i have noticed them using :: within something, what is that?

Hi gnomic,

pls go to the documentation page on oxidforge.org. you’ll find the source code documentation there and search for the getters you want to explore :wink:

Cheers

And how do i extract the info i asked in OP?
I search in the source code documentation after getArticleList and found:
http://docu.oxid-esales.com/CE/sourcecodedocumentation/4.1.2.18998/search_8php-source.html

public function getArticleList()
{
return $this->_aArticleList;
}

which doesnt tell me much about, whats within that function?

  • it doesnt answer:
    $ = variable?
    () = function?
    -> = ?
    and how do i know, what i need to have infront of it, before i can get the info within that function?
    Search::getArticleList it found, when i seached, so what is “::” ?

in here: http://wiki.oxidforge.org/Tutorials/Removed_deprecated_source they write: $oView->getArticleList(); … but how do i know, it should be $oView-> infront and what does -> mean?

Paamayim Nekudotayim

You should start with building a solid knowledge of php before starting with OXID (or any other software written in php)

you can start with this Tutorial:
http://www.w3schools.com/php/default.asp

and consider updating to a newer OXID Version, 4.1 is veeery old :smiley:

@msslovi0
I dont want to learn a whole(+ smarty…) programming language, just because i need a few simple things on my website, but thanks for the info(::slight_smile: tho.

So far, no one has shown any interest in getting a job in here.

@vanilla thunder
I use 4.6.5 which is the newest supported for my module

Edit: back on topic:
It’s used in object oriented code and can refer to a method or property of an object.

“class person {
public $name;
};
$john = new person();
$john->name = ‘John’;
echo $john->name;
<WhiteVAL> Return: John”

i manages to find this, but it still doesnt tell me, where i find out, what getArticleList etc. contains of info

you linked the documentation for OXID v4.1.2, which is a bit outdated.

if you would search in a newer one, e.g the one for 4.6.5 you would find some descriptions like:
http://docu.oxid-esales.com/CE/sourcecodedocumentation/4.6.5.49955/classa_list.html#a467410811b75c98cc2f6127948da9e02
or http://docu.oxid-esales.com/CE/sourcecodedocumentation/4.6.5.49955/class_search.html#aee806de42d06671a285a2c8be8747008
or http://docu.oxid-esales.com/CE/sourcecodedocumentation/4.6.5.49955/class_start.html#aebaf48ee1580ca0abea625a98710c9de

and you don’t need to learn the whole php and smarty, but you can use the toturials and manual to look-up the stuff you don’t know. But nevertheless you should learn some basics, it would help you to understand OXID faster.

[QUOTE=gnomic;116010]I dont want to learn a whole(+ smarty…) programming language, just because i need a few simple things on my website, but thanks for the info(::slight_smile: tho.[/QUOTE]

Well, currently you’re standing in front of a car, don’t know how to name those four round black things that touch the ground and wonder how you can make them turn. Honestly, you should get some basics before driving the Indy 500.

@msslovi0 , agree, and thats what im doing, im looking at some the stuff, thats posted.
Just wish oxid was more known, so it was actually posible to buy people to make small jobs, as the things i have in mind.

I figured out, that if we look in views/alist.php we have a lot of functions like getArticleList() but it gets it info from aArticleList:
“return $this->_aArticleList;” where do i find _aArticleList? <- this is what i have spend a lot of time, trying to figure out. its in here: http://www.8tiny.com/source/oxideshop/views/oxubase.php.source.html#l335
Vendor list object.
@var object

must be posible to get more info out of that. Will learning some basic stuff about php, teach me where this is located? :slight_smile:

lets pick-up the car analogy again.

there is a function giveLuggage() {
return $this->_contentOfTheLuggageSpace;
}

What do you expect, where comes the the stuff in the luggage space from? The car doens not knit the spare tire and other stuff by itself. So… obviously someone has put some luggage in to the car.

You have the var name, so you can search in the php class for functions, which put something into this var

This is all the files in the oxid installation, that contains _aArticleList:
\views\alist.php
\views\manufacturerlist.php
\views\oxubase.php
\views\recommlist.php
\views\search.php
\views\start.php
\views ag.php
\views\vendorlist.php
and they are all just getting there information from it, so im not sure, where its being made? tryed searching thought my database and i didnt find anything called that aswell.

there are many cars with a luggage space…

start learning php basics and you will understand this stuff

[QUOTE=gnomic;116084]and they are all just getting there information from it[/QUOTE]

Line 759 in views/alist.php proves you wrong.

ahh, now i think i get it.

public function getArticleList()
{
    if ( $this-&gt;_aArticleList === null ) {
        if ( /*$this-&gt;_isActCategory() &&*/ ( $oCategory = $this-&gt;getActCategory() ) ) {
            $aArticleList = $this-&gt;_loadArticles( $oCategory );
            if ( count( $aArticleList ) ) {
                $this-&gt;_aArticleList = $aArticleList;
            }
        }
    }
    return $this-&gt;_aArticleList;
}

I looked at it, as if it never got into the first if statement, since i expected _aArticleList to contain information and therefore not be null. So its being filled with information from: $this->_loadArticles( $oCategory ); which i now have to look into… think this is correct.