My grammar textbook contains the following sentence:
子供のころから、周りのことを考えて行動するようにと言われてきた。
What is the meaning of 〜ように in this sentence? There are many grammar rules involving 〜ように, and I wasn't able to determine which one is being used. Also, I would like to know what the whole sentence means. Thank you.