Skip to content

Commit

Permalink
added lifecycle-component
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 15, 2021
1 parent d25dc93 commit 90a3be9
Show file tree
Hide file tree
Showing 3 changed files with 383 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cs/components.texy
Expand Up @@ -390,6 +390,8 @@ Další použití komponent v souvislosti s DI je [popsáno tady |di-factory#kom
Komponenty do hloubky
=====================

[* lifecycle-component.svg *] *** *Životní cyklus componenty* .<>

Komponenty bývají ve většině případů vykreslitelné. Vedle nich však existují i nevykreslitelné komponenty. Stejně tak některé komponenty mohou mít potomky, jiné zase ne. Nette Framework pro všechny tyto typy komponent zavádí několik tříd a rozhraní.

Dědičnost objektů nám umožňuje třídy zařadit do hierarchické struktury, stejně jako je to v reálném světě. Můžeme totiž vytvářet nové třídy odvozením od jiných. Tyto odvozené třídy jsou pak potomkem původní třídy a dědí jeho členské proměnné a metody. Odvozená třída může přidávat další funkcionalitu (metody a členské proměnné) k již zděděným schopnostem.
Expand Down
2 changes: 2 additions & 0 deletions en/components.texy
Expand Up @@ -390,6 +390,8 @@ Further usage of components in context of DI is [discussed here |di-factory#comp
Advanced Use of Components
==========================

[* lifecycle-component.svg *] *** *Life cycle of components* .<>

Components are mostly renderable. But also unrenderable components exist. Some components can have descendants some not. Nette Framework introduces several classes and interfaces for all these types of components.

Object inheritance allows us to have a hierarchic structure of classes like in real world. We can create new classes by extending. These extended classes are descendants of the original class and inherit its parameters and methods. Extended class can add its own parameters and methods to the inherited ones.
Expand Down

0 comments on commit 90a3be9

Please sign in to comment.