Skip to content

Montekarl sf1#297

Open
aurelijusb wants to merge 14 commits intohomework-2019-11-12from
montekarl-sf1
Open

Montekarl sf1#297
aurelijusb wants to merge 14 commits intohomework-2019-11-12from
montekarl-sf1

Conversation

@aurelijusb
Copy link
Owner

Kopija nuo: #264


public function groupByStudents(array $projects)
{
$data1 = file_get_contents('https://hw1.nfq2019.online/students.json');
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reikėtų stengtis nekartoto to paties kodo. Programavimo nauda ir yra, kad galima tą patį kodo gabalą iškviesti iš kelių vietų.

Plačiau:

{% extends 'base.html.twig' %}

{% block title %}{{ someVariable }}{% endblock %}
{% block title %}{% endblock %}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atidumo: pavyzdyje buvo kitos title

<ul>
{% for student in team["students"] %}
<li>
<a href="{{ path('student', {'student':student}) }}">{{student}}</a>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Čia tikėjausi, kad paduosi name ir project kaip parametrus. Kažką panašaus į:

Suggested change
<a href="{{ path('student', {'student':student}) }}">{{student}}</a>
<a href="{{ path('student', {'name':student.name, 'project': student.project}) }}">{{student}}</a>

Kad būtų adresas student?name=Karolis&project=devcollab

</ul>

<a href="{{ path('student') }}">Student</a>
<a href="{{ path('home') }}?student={{ '' }}"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kažkas čia supainiota

<pre>
<p>
Gerb, dėstytojau,
atsiprašau, kad vėluoju. Parašykite penkis, prašau.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

@aurelijusb aurelijusb mentioned this pull request Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments